Closed sungreong closed 3 years ago
Hey @sungreong this is a PyCaret issue, not a tune-sklearn one. When using PyCaret, you should use PyCaret distributions (from pycaret.distributions import *
) instead of tune ones.
Thanks you for your reply. I know it is not tune-sklearn issue. This is pycaret issue. But i follow pycaret docs In the document, they mention like this.
custom_grid: dictionary, default = None To define custom search space for hyperparameters, pass a dictionary with parameter name and values to be iterated. Custom grids must be in a format supported by the defined search_library.
https://pycaret.readthedocs.io/en/latest/api/regression.html
So could you give me the sample code?
You will want to do something like this:
from pycaret.datasets import get_data
boston = get_data('boston')
from pycaret.regression import *
from pycaret.distributions import UniformDistribution, CategoricalDistribution
exp_name = setup(data = boston, target = 'medv',silent=True,n_jobs =20)
catboost_model = create_model('catboost')
catboost_param_dists = {
'iterations': CategoricalDistribution([500,100,300]),
# 'reg_lambda': UniformDistribution(1, 100),
# 'bagging_temperature': UniformDistribution(0, 100),
'colsample_bylevel': UniformDistribution(0.5, 1.0),
'random_strength': CategoricalDistribution([0,0.1,0.2,1,10]), # tune.uniform(0, 100),
# 'learning_rate': UniformDistribution(1e-3, 1e-1),
'max_depth' : CategoricalDistribution([5,6,7,8,9])
}
tuned_top1 = tune_model(catboost_model,
optimize="R2",
search_library="tune-sklearn",
search_algorithm="hyperopt",
choose_better = True ,
custom_grid = catboost_param_dists ,
early_stopping = "asha",
early_stopping_max_iters = 10,
return_tuner = False ,
n_iter=100)
Thanks it works !
pycaret version : 2.3.1
I want to use a variety of tune methods when using hyperopt in pycaret, but only tune.choice is possible, not others. I hope you check and improve!
so i check your code
in now status, pycaret only support "tune.choice"
And it seems only available if a certain range is set.
So this problem can only be done by setting a certain range with any algorithm I use.
Error msg
Do you have a development schedule to improve this problem?
thanks :)