hyperopt / hyperopt-sklearn

Hyper-parameter optimization for sklearn

Home Page:hyperopt.github.io/hyperopt-sklearn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I specify separate validation data for the model fitting?

statcom opened this issue · comments

fit method seems to perform cross-validation. Is there any way to have a separate validation data for the method?

There is, although fit is currently set up to take that separate validation data along with the training data as one array. You can choose the size of the validation set with the valid_size parameter of fit. Setting cv_shuffle=False means the last portion of the data will always be used as validation (this is False by default).

For example, if your training set is 40k samples and your validation is 10k, pass them together and use fit(X, y, valid_size=0.2, cv_shuffle=False)