Skip to content

predict_log_proba


method predict_log_proba(X, verbose=None) [source]

Get class log-probabilities on unseen data or rows in the dataset. New data is first transformed through the model's pipeline. Transformers that are only applied on the training set are skipped. If called from a trainer, the best model in the pipeline (under the winner attribute) is used. If called from a model, that model is used. The estimator must have a predict_log_proba method.

Parameters:

X: int, str, slice, sequence or dataframe-like
Index names or positions of rows in the dataset, or unseen feature set with shape=(n_samples, n_features).

pipeline: bool, sequence or None, optional (default=None)
Transformers to use on the data before predicting.
  • If None: Only transformers that are applied on the whole dataset are used.
  • If False: Don't use any transformers.
  • If True: Use all transformers in the pipeline.
  • If sequence: Transformers to use, selected by their index in the pipeline.

verbose: int or None, optional (default=None)
Verbosity level of the output. If None, it uses the transformer's own verbosity.

Returns: np.array
The class log-probabilities of the input samples, with shape=(n_samples,) for binary classification tasks and (n_samples, n_classes) for multiclass classification tasks.


Example

from atom import ATOMClassifier

atom = ATOMClassifier(X, y)
atom.run(["Tree", "AdaB"], metric="AP", n_calls=10)

# Make predictions on new data
predictions = atom.adab.predict_log_proba(X_new)
Back to top