WordEmbeddingTransformer class

Definition

Creates word embeddings from pre-trained models.

WordEmbeddingTransformer(embeddings_provider: azureml.automl.runtime.featurizer.transformer.data.abstract_wordembeddings_provider.AbstractWordEmbeddingsProvider, logger: typing.Union[logging.Logger, NoneType] = None, token_pattern: str = '(?u)\\b\\w+\\b') -> None
Inheritance
sklearn.base.BaseEstimator
WordEmbeddingTransformer

Methods

fit

Fit method.

get_memory_footprint(X: typing.Union[numpy.ndarray, pandas.core.frame.DataFrame, scipy.sparse.base.spmatrix, azureml.dataprep.api.dataflow.Dataflow], y: typing.Union[numpy.ndarray, pandas.core.series.Series, pandas.core.arrays.categorical.Categorical, azureml.dataprep.api.dataflow.Dataflow]) -> int

Obtain memory footprint by adding this featurizer.

initialize() -> None

Initialize objects that aren't picklable.

transform(X: typing.Union[numpy.ndarray, pandas.core.series.Series, pandas.core.arrays.categorical.Categorical, azureml.dataprep.api.dataflow.Dataflow]) -> numpy.ndarray

Transform method.

fit

Fit method.

Parameters

X

Input data.

y

Labels.

Returns

self.

get_memory_footprint(X: typing.Union[numpy.ndarray, pandas.core.frame.DataFrame, scipy.sparse.base.spmatrix, azureml.dataprep.api.dataflow.Dataflow], y: typing.Union[numpy.ndarray, pandas.core.series.Series, pandas.core.arrays.categorical.Categorical, azureml.dataprep.api.dataflow.Dataflow]) -> int

Obtain memory footprint by adding this featurizer.

get_memory_footprint(X: typing.Union[numpy.ndarray, pandas.core.frame.DataFrame, scipy.sparse.base.spmatrix, azureml.dataprep.api.dataflow.Dataflow], y: typing.Union[numpy.ndarray, pandas.core.series.Series, pandas.core.arrays.categorical.Categorical, azureml.dataprep.api.dataflow.Dataflow]) -> int

Parameters

X

Input data.

y

Input label.

Returns

Amount of memory taken.

initialize() -> None

Initialize objects that aren't picklable.

initialize() -> None

Returns

None.

transform(X: typing.Union[numpy.ndarray, pandas.core.series.Series, pandas.core.arrays.categorical.Categorical, azureml.dataprep.api.dataflow.Dataflow]) -> numpy.ndarray

Transform method.

transform(X: typing.Union[numpy.ndarray, pandas.core.series.Series, pandas.core.arrays.categorical.Categorical, azureml.dataprep.api.dataflow.Dataflow]) -> numpy.ndarray

Parameters

X

Input data.

Returns

Transformed data.

Attributes

EMBEDDING_PROVIDER_KEY

EMBEDDING_PROVIDER_KEY = 'embeddings_provider'