Save Experiment


Saving or logging an entire experiment in PyCaret is as simple as writing save_experiment. The function saves the entire environment including transformation pipeline, models created and all the intermediary outputs as a transferable binary pickle file for later use.

 

Example

 

Code
# Importing dataset
from pycaret.datasets import get_data
boston = get_data('boston')

# Importing module and initializing setup
from pycaret.regression import *
reg1 = setup(data = boston, target = 'medv')

# compare models
compare_models()

# create a model
xgboost = create_model('xgboost')

# blend models
blend_models()

#saving an experiment
save_experiment('experiment_07032020')

 

Output

Loading saved experiment

 

Code
# Loading saved experiment
experiment_saved = load_experiment('experiment_07032020')

 

Output