NaiveBayes class

Definition

Wrapper for sklearn Multinomial Naive Bayes.

NaiveBayes(logger: typing.Union[logging.Logger, NoneType] = None)
Inheritance
sklearn.base.BaseEstimator
NaiveBayes
azureml.automl.runtime.shared.model_wrappers._AbstractModelWrapper
NaiveBayes

Methods

fit(x, y=None)

Naive Bayes transform to learn conditional probablities for textual data.

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 estimate for this transformer.

get_model()

Return inner NB model.

transform(x)

Transform data x.

fit(x, y=None)

Naive Bayes transform to learn conditional probablities for textual data.

fit(x, y=None)

Parameters

x
ndarray or pandas.series

The data to transform.

y
ndarray

Target values.

Returns

The instance object: 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 estimate for this transformer.

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.

get_model()

Return inner NB model.

get_model()

Returns

NaiveBayes model.

transform(x)

Transform data x.

transform(x)

Parameters

x
ndarray or pandas.series

The data to transform.

Returns

Prediction probability values from Naive Bayes model.