The tune_model function in the pycaret.classification module and the pycaret.regression module employs random grid search over pre-defined grid search for hyper-parameter tuning. Here the default number of iterations is set to 10.
Results from tune_model may not necessarily be an improvement on the results from the base models created using create_model. Since the grid search is random, you can increase the n_iter parameter to improve the performance. See example below:
#tune with default n_iter i.e. 10 tuned_dt1 = tune_model('dt') #tune with n_iter = 50 tuned_dt2 = tune_model('dt', n_iter = 50)
Comments