How does RandomizedSearchCV form the validation sets, while I also defined an evaluation set for LGBM? Is it formed from the train set I gave or how does the evaluation set comes into the validation?

I splitted my data into a 80% train set and 20% test set.

I use RandomizedSearchCV to optimize the params for LGBM, while defining the test set as an evaluation set for the LGBM. The code look like this:

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)

distributions = dict(max_depth=range(1,10),

clf = RandomizedSearchCV(model_LGBM, distributions, random_state=0,n_iter=250,verbose=10)

RandomizedSearchCV uses 5 set as a default for cv, is it formed from the training set?



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.