859 questions
48
votes
4
answers
49k
views
Hyperparameter optimization for Pytorch model [closed]
What is the best way to perform hyperparameter optimization for a Pytorch model? Implement e.g. Random Search myself? Use Skicit Learn? Or is there anything else I am not aware of?
45
votes
3
answers
32k
views
How to insert Keras model into scikit-learn pipeline?
I'm using a scikit-learn custom pipeline (sklearn.pipeline.Pipeline) in conjunction with RandomizedSearchCV for hyper-parameter optimization. This works great.
Now I would like to insert a keras model ...
27
votes
2
answers
24k
views
How to pass elegantly Sklearn's GridseachCV's best parameters to another model?
I have found a set of best hyperparameters for my KNN estimator with Grid Search CV:
>>> knn_gridsearch_model.best_params_
{'algorithm': 'auto', 'metric': 'manhattan', 'n_neighbors': 3}
So ...
27
votes
5
answers
18k
views
In what order should we tune hyperparameters in Neural Networks?
I have a quite simple ANN using Tensorflow and AdamOptimizer for a regression problem and I am now at the point to tune all the hyperparameters.
For now, I saw many different hyperparameters that I ...
23
votes
2
answers
36k
views
What is a good range of values for the svm.SVC() hyperparameters to be explored via GridSearchCV()?
I am running into the problem that the hyperparameters of my svm.SVC() are too wide such that the GridSearchCV() never gets completed! One idea is to use RandomizedSearchCV() instead. But again, my ...
20
votes
2
answers
17k
views
Hyperparameter Tuning of Tensorflow Model
I've used Scikit-learn's GridSearchCV before to optimize the hyperparameters of my models, but just wondering if a similar tool exists to optimize hyperparameters for Tensorflow (for instance number ...
15
votes
2
answers
9k
views
Is there a way to perform grid search hyper-parameter optimization on One-Class SVM
Is there a way to use GridSearchCV or any other built-in sklearn function to find the best hyper-parameters for OneClassSVM classifier?
What I currently do, is perform the search myself using train/...
12
votes
5
answers
17k
views
Hyper-parameter tuning using pure ranger package in R
Love the speed of the ranger package for random forest model creation, but can't see how to tune mtry or number of trees. I realize I can do this via caret's train() syntax, but I prefer the speed ...
12
votes
3
answers
6k
views
Resume Optuna study from most recent checkpoints
Is there a way to be able to pause/kill the optuna study, then resume it either by running the incomplete trials from the beginning, or resuming the incomplete trials from the latest checkpoint?
study ...
11
votes
1
answer
12k
views
How to optimize for multiple metrics in Optuna
How do I optimize for multiple metrics simultaneously inside the objective function of Optuna. For example, I am training an LGBM classifier and want to find the best hyperparameter set for all common ...
11
votes
2
answers
15k
views
How to set optuna's study.optimize verbosity to 0?
I want to set optuna's study.optimize verbosity to 0. I thought optuna.logging.set_verbosity(0) might do it, but I still get the Trial 0 finished with value .... updates for every trial
What is the ...
11
votes
1
answer
3k
views
Compare ways to tune hyperparameters in scikit-learn
This post is about the differences between LogisticRegressionCV, GridSearchCV and cross_val_score. Consider the following setup:
import numpy as np
from sklearn.datasets import load_digits
from ...
10
votes
4
answers
7k
views
How to save the best hyperopt optimized keras models and its weights?
I optimized my keras model using hyperopt. Now how do we save the best optimized keras model and its weights to disk.
My code:
from hyperopt import fmin, tpe, hp, STATUS_OK, Trials
from sklearn....
10
votes
2
answers
3k
views
incompatibility issue between scikit-learn 0.24.1 and scikit-optimize 0.8.1
I have scikit-learn 0.24.1 and scikit-optimize 0.8.1, when I tried to use the BayesSearchCV function it gave me this error:
TypeError: __init__() got an unexpected keyword argument 'iid'
when I ...
10
votes
0
answers
4k
views
Training multiple neural networks asynchronously in parallel
The problem
I am currently working on a project that I sadly can't share with you. The project is about hyper-parameter optimization for neural networks, and it requires that I train multiple neural ...