-
-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross validation inside 'data' function #276
Comments
Hi, I would also be looking for example code for the problem of making kfold cross validation work in hyperas |
@MatsPro Hi, I figured out how to make it work. |
Do you use KerasClassifier or other classifiers? Any suggestions? Could you show your code? |
I am doing a regression problem in Keras. However, it should not make a big difference in hyper optimization. If you could put your code I could tell you how to fix the problem |
After some blood, sweat and tears I managed to do it. I also had to implement fold-wise scaling and oversampling which made it a bit more challenging. This does the deed:
|
Before filing an issue, please make sure to tick the following boxes.
Make sure your issue hasn't been filed already. Use GitHub search or manually check the existing issues, also the closed ones. Also, make sure to check the FAQ section of our readme.
Install latest hyperas from GitHub:
pip install git+git://github.com/maxpumperla/hyperas.git
Install latest hyperopt from GitHub:
pip install git+git://github.com/hyperopt/hyperopt.git
We have continuous integration running with Travis and make sure the build stays "green". If, after installing test utilities with
pip install pytest pytest-cov pep8 pytest-pep8
, you can't successfully runpython -m pytest
there's very likely a problem on your side that should be addressed before creating an issue.Create a gist containing your complete script, or a minimal version of it, that can be used to reproduce your issue. Also, add your full stack trace to that gist. In many cases your error message is enough to at least give some guidance.
I am struggling to implement cross-validation using KFold inside the data function in hyperas. Since the data should be passed into optim.minimize() I do not know how to make cross-validation work using hyperas.
If you have an example code that I can take a look, it is a great help.
Thanks in advance.
The text was updated successfully, but these errors were encountered: