#!/usr/bin/env python # coding: utf-8 # In[ ]: # !pip install pycaret # In[ ]: # !pip install pycaret[full] # In[1]: from pycaret.utils import version version() # In[2]: from pycaret.datasets import get_data data = get_data('juice') # In[3]: data.dtypes # In[4]: data['Purchase'].value_counts() # In[5]: from pycaret.classification import * s = setup(data, target = 'Purchase', log_experiment = True, experiment_name = 'dsc1', fold = 3) # In[6]: xgboost = create_model('xgboost') # In[7]: deploy_model(xgboost, 'dsc123', platform = 'aws', authentication = {'bucket' : 'pycaret-test'}) # In[ ]: # In[ ]: # In[ ]: # In[ ]: # add_metric() # In[ ]: get_ipython().run_cell_magic('time', '', 'best = compare_models()\n') # In[ ]: from sklearn.linear_model import LogisticRegression # In[ ]: asd = LogisticRegression() # In[ ]: create_model(asd) # In[ ]: # In[ ]: lr = create_model('lr') # In[ ]: tuned_lr = tune_model(lr) # In[ ]: tuned_lr = tune_model(lr, search_library = 'optuna') # In[ ]: tuned_lr = tune_model(lr, search_library = 'scikit-optimize') # In[ ]: dt = create_model('dt') # In[ ]: dt # In[ ]: bagged_dt = ensemble_model(dt, method = 'Boosting') # In[ ]: bagged_dt # In[ ]: plot_model(lr, plot = 'feature') # In[ ]: evaluate_model(lr) # In[ ]: dt = create_model('dt') plot_model(dt, plot = 'boundary') # In[ ]: xgboost = create_model('xgboost') # In[ ]: interpret_model(xgboost) # In[ ]: save_model(xgboost, model_name = 'abc') # In[ ]: get_ipython().system('mlflow ui') # In[ ]: # In[ ]: