cellxgene_census.experimental.ml.encoders.BatchEncoder

class cellxgene_census.experimental.ml.encoders.BatchEncoder(cols: list[str], name: str = 'batch')

An encoder that concatenates and encodes several obs columns.

__init__(cols: list[str], name: str = 'batch')

Methods

__init__(cols[, name])

fit(obs)

Fit the encoder with obs.

inverse_transform(encoded_values)

Inverse transform the encoded values back to the original values.

transform(df)

Transform the obs pandas.DataFrame into a pandas.DataFrame of encoded values.

Attributes

classes_

Classes of the encoder.

columns

Columns in obs that the encoder will be applied to.

name

Name of the encoder.