lale.lib.autogen.complement_nb module¶
- class lale.lib.autogen.complement_nb.ComplementNB(*, alpha=1.0, fit_prior=True, class_prior=None, norm=False)¶
Bases:
PlannedIndividualOp
Combined schema for expected data and hyperparameters.
This documentation is auto-generated from JSON schemas.
- Parameters
alpha (float, not for optimizer, default 1.0) – Additive (Laplace/Lidstone) smoothing parameter (0 for no smoothing).
fit_prior (boolean, not for optimizer, default True) – Only used in edge case with a single class in the training set.
class_prior (union type, not for optimizer, default None) –
Prior probabilities of the classes
array of items : float
or None
norm (boolean, not for optimizer, default False) – Whether or not a second normalization of the weights is performed
Notes
constraint-1 : any type
- fit(X, y=None, **fit_params)¶
Train the operator.
Note: The fit method is not available until this operator is trainable.
Once this method is available, it will have the following signature:
- Parameters
X (array of items : array of items : float) – Training vectors, where n_samples is the number of samples and n_features is the number of features.
y (array of items : float) – Target values.
sample_weight (union type, optional, default None) –
Weights applied to individual samples (1
array of items : float
or None
- predict(X, **predict_params)¶
Make predictions.
Note: The predict method is not available until this operator is trained.
Once this method is available, it will have the following signature:
- Parameters
X (array of items : array of items : float) –
- Returns
result – Predicted target values for X
- Return type
array of items : float
- predict_proba(X)¶
Probability estimates for all classes.
Note: The predict_proba method is not available until this operator is trained.
Once this method is available, it will have the following signature:
- Parameters
X (array of items : array of items : float) –
- Returns
result – Returns the probability of the samples for each class in the model
- Return type
array of items : array of items : float