pycaret.classification.ClassificationExperiment#
- class pycaret.classification.ClassificationExperiment[source]#
-
Methods
__init__()add_metric(id, name, score_func[, target, ...])Adds a custom metric to be used in the experiment.
automl([optimize, use_holdout, turbo, ...])This function returns the best model out of all trained models in current session based on the
optimizeparameter.blend_models(estimator_list[, fold, round, ...])This function trains a Soft Voting / Majority Rule classifier for select models passed in the
estimator_listparam.calibrate_model(estimator[, method, ...])This function calibrates the probability of a given estimator using isotonic or logistic regression.
check_drift([reference_data, current_data, ...])This function generates a drift report file using the evidently library.
check_fairness(estimator, sensitive_features)There are many approaches to conceptualizing fairness.
compare_models([include, exclude, fold, ...])This function trains and evaluates performance of all estimators available in the model library using cross validation.
convert_model(estimator[, language])This function transpiles trained machine learning models into native inference script in different programming languages (Python, C, Java, Go, JavaScript, Visual Basic, C#, PowerShell, R, PHP, Dart, Haskell, Ruby, F#).
create_api(estimator, api_name[, host, port])This function takes an input
estimatorand creates a POST API for inference.create_app(estimator, app_kwargs)This function creates a basic gradio app for inference.
create_docker(api_name[, base_image, ...])This function creates a
Dockerfileandrequirements.txtfor productionalizing API end-point.create_model(estimator[, fold, round, ...])This function trains and evaluates the performance of a given estimator using cross validation.
dashboard(estimator[, display_format, ...])This function generates the interactive dashboard for a trained model.
deploy_model(model, model_name, authentication)This function deploys the transformation pipeline and trained model on cloud.
ensemble_model(estimator[, method, fold, ...])This function ensembles a given estimator.
evaluate_model(estimator[, fold, ...])This function displays a user interface for analyzing performance of a trained model.
finalize_model(estimator[, fit_kwargs, ...])This function trains a given estimator on the entire dataset including the holdout set.
get_allowed_engines(estimator)Get all the allowed engines for the specified estimator
get_config([variable])This function is used to access global environment variables.
get_engine(estimator)Gets the model engine currently set in the experiment for the specified model.
get_leaderboard([finalize_models, ...])generates leaderboard for all models run in current run.
get_logs([experiment_name, save])Returns a table of experiment logs.
get_metrics([reset, include_custom, ...])Returns table of available metrics used in the experiment.
interpret_model(estimator[, plot, feature, ...])This function takes a trained model object and returns an interpretation plot based on the test / hold-out set.
load_experiment(path_or_file[, data, ...])Load an experiment saved with
save_experimentfrom path or file.load_model(model_name[, platform, ...])This function loads a previously saved pipeline.
models([type, internal, raise_errors])Returns table of models available in the model library.
optimize_threshold(estimator[, optimize, ...])This function optimizes probability threshold for a trained classifier.
plot_model(estimator[, plot, scale, save, ...])This function analyzes the performance of a trained model on holdout set.
plot_model_check_display_format_(display_format)Checks if the display format is in the allowed list
predict_model(estimator[, data, ...])This function predicts
LabelandScore(probability of predicted class) using a trained model.pull([pop])Returns the latest displayed table.
remove_metric(name_or_id)Removes a metric from the experiment.
save_experiment(path_or_file, ...)Saves the experiment to a pickle file.
save_model(model, model_name[, model_only, ...])This function saves the transformation pipeline and trained model object into the current working directory as a pickle file for later use.
set_config([variable, value])This function is used to reset global environment variables.
setup([data, data_func, target, index, ...])This function initializes the training environment and creates the transformation pipeline.
stack_models(estimator_list[, meta_model, ...])This function trains a meta model over select estimators passed in the
estimator_listparameter.tune_model(estimator[, fold, round, n_iter, ...])This function tunes the hyperparameters of a given estimator.
Attributes
XFeature set.
X_testFeature set of the test set.
X_test_transformedTransformed feature set of the test set.
X_trainFeature set of the training set.
X_train_transformedTransformed feature set of the training set.
X_transformedTransformed feature set.
datasetComplete dataset without ignored columns.
dataset_transformedTransformed dataset.
gpu_n_jobs_paramis_multiclassMethod to check if the problem is multiclass.
testTest set.
test_transformedTransformed test set.
trainTraining set.
train_transformedTransformed training set.
variable_and_property_keysvariablesyTarget column.
y_testTarget column of the test set.
y_test_transformedTransformed target column of the test set.
y_trainTarget column of the training set.
y_train_transformedTransformed target column of the training set.
y_transformedTransformed target column.