I have a dataset with the following dimensions for training and testing sets:
X_train = (58149, 9)
y_train = (58149,)
X_test = (24921, 9)
y_test = (24921,)
The code that I have for RandomizedSearchCV
using LightGBM classifier is as follows:
# Parameters to be used for RandomizedSearchCV-
rs_params = {
# 'bagging_fraction': [0.6, 0.66, 0.7],
'bagging_fraction': sp_uniform(0.5, 0.8),
'bagging_frequency': sp_randint(5, 8),
# 'feature_fraction': [0.6, 0.66, 0.7],
'feature_fraction': sp_uniform(0.5, 0.8),
'max_depth': sp_randint(10, 13),
'min_data_in_leaf': sp_randint(90, 120),
'num_leaves': sp_randint(1200, 1550)
}
# Initialize a RandomizedSearchCV object using 5-fold CV-
rs_cv = RandomizedSearchCV(estimator=lgb.LGBMClassifier(), param_distributions=rs_params, cv = 5, n_iter=100)
# Train on training data-
rs_cv.fit(X_train, y_train)
When I execute this code, it gives me the following error:
LightGBMError: Check failed: bagging_fraction <=1.0 at /__w/1/s/python-package/compile/src/io/config_auto.cpp, line 295.
Any idea as to what's going wrong?