Questions tagged [grid-search]

In machine learning, grid search refers to multiple runs to find the optimal value of parameter(s)/hyperparameter(s) of a model, e.g. mtry for random-forest or alpha, beta, lambda for glm, or C, kernel and gamma for SVM.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

Selecting the best model parameters from grid search SARIMA [Time series]

I ran a manual gridsearch of SARIMA across several parameters and now I have 7875 rows of scores (RMSE, MAE, MAPE each) from it. These were the parameters (30k+ permutations) I ran a grid search over- ...
0
votes
1answer
27 views

Is Cross validation and GridSearchCV required every time we train a model?

I have a repetitive process that will build a model weekly based on the previous week's data. So while in development I tried GridSearchCV and cross-validation to ...
0
votes
1answer
28 views

Using BERT for search engine with an Elastic Database

I want to make Documents search engine where the user will type a query and top n relevant documents should be shown. I want to use BERT for the searching and the first question is can i use it with ...
0
votes
1answer
12 views

Specifying parameter grid for regression model

I am working with more than one dataset. So, I have to test my Random Forest Model over 4 datasets. The parameter grid I am taking for dataset D1 is not producing good results for dataset D2 and so on....
0
votes
0answers
11 views

Why is GridSearch CV not loading?

Having an issue with GridSeachCV. I am using sklearn 0.24.1. It is has been stuck in "Fitting 5 folds for each of 864 candidates, totalling 4320 fits" for a long time. my dataset only ...
0
votes
1answer
40 views

What's the default Scorer in Sci-kit learn's GridSearchCV?

Even if I don't define the scoring parameter, it scores and makes a decision for best estimator, but documentation says the default value for scoring is "None", so what is it using to score ...
0
votes
1answer
157 views

GridSearchCV Decrease performance RF

Can Gridsearchcv params perform worst than default RF? RF with default values performs rmse_train=4886,r^2_train=0.84, ...
0
votes
0answers
126 views

sklearn gridsearch lasso regression: find specific number of coefficients

I am using GridSearchCV and Lasso regression in order to fit a dataset composed out of Gaussians. I keep this example similar to this tutorial. My goal is to find the best solution with a restricted ...
0
votes
0answers
14 views

Which Random Forest hyperparameters to tune with Grid Search and which are the best initial hyperparameters values?

I want to use Grid Search for finding optimal hyperpameters for Random Forest. My questions are: Which Random Forest hyperparameters are considered important for tuning? Which initial Random Forest ...
0
votes
0answers
15 views

Grid Search using strategy

What is the correct strategy of using Grid Search? Am I understand correctly that to use correctly Grid Search I should: Give Grid Search initial parameters that have wide range. For example if ...
0
votes
0answers
28 views

Cross validation with GridSearchCV or train-val-test split

I have a question regarding the CV in GridSearchCV. To test my model should I split my data into 3: training, validation, test? For easy understanding let's say my data is split into training with 60% ...
1
vote
1answer
49 views

GridSearchCV with custom tune grid

What is the best way to perform custom parameter search CV with the Scikit-learn API? I really like GridSearchCV. However for my case the param_grid parameter is ...
0
votes
1answer
386 views

Understand RandomizedSearchCV output

I am trying to do hyperparameter tunning for the Randomforest regression model. I'm using RandomizedSearchCV (scikit-learn) and I defined verbose=10. For that reason, I'm getting messaged while it's ...
0
votes
1answer
87 views

using simple autoencoder for feature selection

I am using a simple autoencoder to extract the informative features and I have multiple Q: I know that the features extracted will be a linear combination of the original features so I consider that ...
1
vote
2answers
211 views

How plot GridSearch results?

I trained an SVM model with GridSearch ...
0
votes
1answer
104 views

Does GridSearchCV not save the best parameters?

So I tuned the hyperparameters using GridSearchCV, fitted the model to the data, and then used best_params_. I'm just curious ...
1
vote
1answer
70 views

small dataset CV

I have a very small dataset ( 150 records) with 20 features, trying to predict a binary outcome. Due to the small size, i chose to do 10 CV instead of train/test as the train/test split. I was ...
0
votes
1answer
501 views

How to refit GridSearchCV on Multiclass problem

I'm trying to use GridSearchCV for my Multiclass problem. For starters, wanted to test it on KNeighborsClassifier. First, here's the code where I define the function which uses GridSearchCV: ...
0
votes
0answers
177 views

how to set gridsearchCV to ignore the errors

I want to use GridSearchCV in Python for my Logistic Regression model, and i want it to check combinations for every possible setting, but i get an error when there is time for penalty: l1 and solver ...
2
votes
1answer
308 views

how to prevent machine crash while searching for hyper parameters of XGBoost with GridSearchCV

I am searching for best hyper parameters of XGBRegressor using GridSearchCV. Here is the code: ...
0
votes
1answer
100 views

SKLEARN GridSearchCV hinting higher accuracy than Pipeline but with same parameters as Pipeline estimators

I have pipeline estimators like this: ...
0
votes
1answer
33 views

GridSearchCV Acting Weird

I am using GridSearchCV to find the best combination of parameters for SVM. However, the parameters chosen by GridSeasrchCV do not seem to be the best ones. I tried some parameters randomly and they ...
2
votes
0answers
49 views

Initial value space for Random Forest hyperparameter tuning

I'm building a Random Forest Classifier using Scikit Learn. My problem consists in a 4 class classification task, the values are distributed as follows (after splitting my data in training set and ...
1
vote
0answers
69 views

xgboost calibration kde plots (isotonic) not smooth

i am training my xgboost model on an imbalanced binary classification problem. It is important to me to have well calibrated probabilities so i have chosen to optimize the brier score. I then plot the ...
0
votes
0answers
34 views

Why do you need to update the number of boosting rounds each time you update a parameter in xgboost?

I have been reading material that suggesting that, after each grid search you do on a single parameter (e.g say on learning rate), you should update the number of boosting rounds afterwards. This is ...
2
votes
2answers
85 views

Faster grid search with small dataset to derive best params instead of full dataset?

I have a dataset of 300 000 rows and an ensemble model, which include grid search to find the best params of every algorithm. Unfortunately the grid search needs to long and I have problems to ...
0
votes
0answers
330 views

How to construct pipeline with different alternative transformations for different kind of features in Scikit-learn?

I try to construct a pipeline in sklearn where I do different (in some cases multiple) transformations on different kind (numeric/ordinal/binary nominal/non-binary non-ordinal nominal) features. An ...
0
votes
1answer
218 views

MLP classifier Gridsearch CV parameters to tune?

I'm looking to tune the parameters for sklearn's MLP classifier but don't know which to tune/how many options to give them? Example is learning rate. should i give it[.0001,.001,.01,.1,.2,.3]? or is ...
3
votes
3answers
279 views

What's the difference between GridSearchCrossValidation score and score on testset?

I'm doing classification using python. I'm using the class GridSearchCV, this class has the attribute best_score_ defined as "Mean cross-validated score of the best_estimator". With this ...
2
votes
1answer
93 views

why does my calibration curve for platts and isotonic have less points than my uncalibrated model?

i train a model using grid search then i use the best parameters from this to define my chosen model. ...
3
votes
2answers
971 views

When using Scikit Learn Grid Search, why are my train and cv scores high, but my test score is a lot lower?

I'm using scikit learn to run some models, and am very confused as to why my test score is so much lower than my cv score and my train score. At the start, I do a 80-20 train-test split. On the train ...
0
votes
1answer
207 views

plot gridsearch csv results how?

how can i plot my results from gridsearch csv? ...
0
votes
1answer
787 views

XGBoost Log Loss different from GridSearchCV Log Loss

I have a classification problem where I am trying to predict if the data returns a 1 or 0. So your classic binary classification. I have my set of data that I have split into the dependent variables (...
0
votes
2answers
88 views

Error when trying to run RandomForestClassifer with Pipieline and GridSearch [closed]

I am trying to run a RandomForest Classifier using Pipeline, GridSerach and CV I am getting an error when I fit the data. I am not sure how to fix it. Will appreciate any help on this. My code is: ...
2
votes
1answer
661 views

my xgboost model accuracy decreases after grid search with [duplicate]

I tried grid search for hyperparameter tuning in XGBoost classifier but the best accuracy is less than the accuracy without any tuning ...
1
vote
2answers
80 views

is this grid search methodology correct?

I have some data say 1 million rows, I then put 200k aside (to validate against) and call this remaining 800,000 the training set (X) as you see below, so it is not the entire data and the remaining ...
2
votes
2answers
146 views

What is the purpose of a confusion matrix in a classification problem?

I am studying machine learning. After some research I understood that a typical workflow for a classification problem (after having prepared the data) is the following: Split data in test, train and ...
0
votes
1answer
853 views

plotting a decision tree based on gridsearchcv

i was trying to plot the decision tree which is formed with GridSearchCV, but its giving me an Attribute error. ...
0
votes
1answer
131 views

Getting a best k in KNN Algorithm

So, i was learning the KNN Algorithm and there i learnt cross Validation to find a optimal value of k.Now i want to apply grid search to get the optimal value.I found an answer on stack overflow where ...
0
votes
2answers
55 views

How to choose the best hyper-parameter when it is directly influenced by the random_state?

While trying to evaluate my Ridge Regression model and using GridSearchCV to find the best parameter. I noticed that the best estimator changes every time I change the ...
1
vote
2answers
707 views

Python and GridSearchCV how to eliminate input contains NaN error when using cross validation and decision tree classifier?

I am trying to do cross validation on Decision tree classifier for kaggle's titanic dataset. The first step after cleaning data is to split into train and test sets: ...
3
votes
1answer
19 views

Do i need to use hyperparamters from Gridsearch to train on WHOLE training set to get final model?

I just want to make sure i am on the right lines so please correct me if wrong. I am testing which hyperparmets are best for logisitic regession on my data X, y where X is featrues and y is target. X, ...
1
vote
1answer
714 views

Determine model hyper-parameter values for grid search

I built machine learning model for Ridge,lasso, elastic net and linear regression, for that I used gridsearch for the parameter tuning, i want to know how give value range for **params Ridge ** below ...
3
votes
1answer
102 views

Unbalanced data set - how to optimize hyperparams via grid search?

I would like to optimize the hyperparameters C and Gamma of an SVC by using grid search for an unbalanced data set. So far I have used class_weights='balanced' and selected the best hyperparameters ...
2
votes
1answer
3k views

Ridge regression model creation using grid-search and cross validation

I created python code for ridge regression.For that I used cross validation and grid-search technique in together. i got output result. I want check whether my regression model building steps correct ...
4
votes
5answers
5k views

GridSearch without CV

I create a Random Forest and Gradient Boosting Regressor by using GridSearchCV. For the Gradient Boosting Regressor, it takes too long for me. But I need to know which are the best parameters for the ...
5
votes
1answer
2k views

Is GridSearchCV in combination with ImageDataGenerator possible and recommendable?

I want to optimize some hyperparameters for a CNN architecture by using GridSearchCV (Scikit-Learn) in combination with Data Augmentation (ImageDataGenerator from Keras). However, GridSearchCV only ...
2
votes
2answers
107 views

How to yield better AUC score?

I have a dataset with 5K records and 60 features focused on binary classification. Class proportion is 33:67 Currently I am trying to increase the performance of my model which is stuck at F1-score ...
1
vote
1answer
59 views

Which combination of 3 hyperparameters to combat overfitting of a convolutional neural network?

I have a small dataset with which I want to train a CNN by using Data Augmentation. Since the CNN is overfitting due to the small data set, I would like to optimize some hyperparameters. However, ...
1
vote
1answer
44 views

Random Forest Model Giving Same Accuracy for different feature sets after tuning

I am having this weird issue and cannot seem to find a solution. I am trying to tune a different random forest model for every different feature-set. Basically from a given data set, I have created 3 ...