Questions tagged [gridsearchcv]

The tag has no usage guidance.

0
votes
1answer
10 views

CNNs - Hyperparameter tuning with different training sizes of the same data set

I would like to compare how much the classification performance (test accuracy) of CNNs changes depending on the size of the data set. For this I would like to use a data set like MNIST or Fashion ...
1
vote
1answer
11 views

A doubt about the GridSearchCV function in Sklearn?

When creating different hyperparameter combinations, does the function evaluate combination 1 on the same fold as combination 2? As in, are the folds the same across combinations? I understand that ...
0
votes
0answers
31 views

GridSearchCV with MLPRegressor with Scikit learn

I'm trying to apply automatic fine tuning to a MLPRegressor with Scikit learn. After reading around, I decided to use GridSearchCV to choose the most suitable hyperparameters. Before that, I've ...
1
vote
2answers
43 views

Large negative R2 or accuracy scores for random forest with GridSearchCV but not train_test_split

I'm trying to use GridSearchCV from scikit-learn and look at the difference between train/test metrics. When I do a normal test/train split with RandomForestRegressor, the metrics are comparable. ...
1
vote
1answer
49 views
0
votes
0answers
104 views

XGBOOST (sklearn interface) REGRESSION error

I am trying to run a GRIDSEARCHCV (sklearn) on XGBRegressor. Documentation on the parameter says that if regression, then objective = reg:squarederror.(see https://...
1
vote
2answers
84 views

Grid search model isn't recognized as fitted for Graphviz

I find this really weird, and the code is really straight forward. What am I doing wrong ? ...
3
votes
1answer
275 views

What is GridSearchCV doing after it finishes evaluating the performance of parameter combinations that takes so long?

I'm running GridSearchCV to tune some parameters. For example: ...
0
votes
0answers
13 views

Does sklearn's gridsearchCV use the same cross validation train/test splits for evaluating each hyperparameter combination?

I couldn't find the answer on any forum in the interwebs so I hunted down the answer myself. Yes; the same train/test splits are used for each parameter combination. Here Is the relevant sklearn ...
0
votes
0answers
40 views

Time Series Split on unequal number of samples

I am Trying to apply Time Series Split on my data, I have dates consisting of year and months and I want to train my data on monthly interval, using Januray 2005 to train and test. Then January and ...
1
vote
1answer
681 views

How to get mean test scores from GridSearchCV with multiple scorers - scikit-learn

I'm trying to get mean test scores from scikit-learn's GridSearchCV with multiple scorers. grid.cv_results_ displays lots of ...
4
votes
4answers
205 views

Default parameters for decision trees give better results than parameters optimised using GridsearchCV

I am using Gridsearch for a DecisionTreeClassifier predicting a binary outcome. When I run fit and predict with default parameters, I get the following results: ...
0
votes
1answer
532 views

sklearn.GridSearchCV predict method not providing the best estimate and accuracy score

I was playing around with the credit default dataset in UCI ("https://archive.ics.uci.edu/ml/machine-learning-databases/00350/default%20of%20credit%20card%20clients.xls") These are the steps i have ...
0
votes
1answer
645 views

Using GridSearchCV and a Random Forest Regressor with the same parameters gives different results

As the huge title says I'm trying to use GridSearchCV to find the best parameters for a Random Forest Regressor and I'm measuring my results with mse. ...
2
votes
1answer
57 views

Overfitted model produces similar AUC on test set, so which model do I go with?

I was trying to compare the effect of running GridSearchCV on a dataset which was oversampled prior and oversampled after the training folds are selected. The oversampling approach I used was random ...
2
votes
1answer
1k views

GridSearchCV results are different to directly applied default model (SVM)

I run a Support Vector Machines model on part of my train set with following result: ...
2
votes
1answer
222 views

Sklearn Pipelines - How to carry over PCA?

I'm developing a pipeline to fit parameters for a gradient boosting classifier while also fitting the optimum number of features in a PCA model. This is the current setup: ...
2
votes
1answer
4k views

How to set class-weight for imbalanced classes in KerasClassifier while it is used inside the GridSearchCV?

Could you please let me know how to set class-weight for imbalanced classes in KerasClassifier while it is used inside the ...