cellxgene_census.experimental.ml.encoders.LabelEncoder
- class cellxgene_census.experimental.ml.encoders.LabelEncoder(col: str)
Default encoder based on
sklearn.preprocessing.LabelEncoder.Methods
__init__(col)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.