#!/usr/bin/env python # coding: utf-8 # In[ ]: # to install pycaret-nightly # pip install pycaret-nightly # In[ ]: from pycaret.utils import version version() # # 1. Load Dataset # In[ ]: from pycaret.datasets import get_data data = get_data('boston') # # 2. Initialize setup # In[ ]: from pycaret.regression import * reg1 = setup(data, target = 'medv', logging=True, experiment_name='boston-tf-meetup-temp') # # 3. Compare Models # In[ ]: top5 = compare_models(n_select = 5) # In[ ]: print(top5) # # 3. Blend Models # In[ ]: blender = blend_models(estimator_list = top5) # # 4. Stack Models # In[ ]: stacker = stack_models(estimator_list = top5[1:], meta_model = top5[0]) # # 5. Tune Models # In[ ]: tuned_et = tune_model(top5[1], n_iter=50) # # 6. Init MLFlow UI # In[ ]: get_ipython().system('mlflow ui') # In[ ]: lightgbm = create_model('lightgbm') # In[ ]: import numpy as np for i in np.arange(0.1,1,0.01): create_model('lightgbm', learning_rate=i, verbose=False) # In[ ]: get_ipython().system('mlflow ui') # In[ ]: