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
obscolumns.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.DataFrameinto apandas.DataFrameof encoded values.Attributes
classes_Classes of the encoder.
columnsColumns in
obsthat the encoder will be applied to.nameName of the encoder.