Giter VIP home page Giter VIP logo

Comments (5)

ilblackdragon avatar ilblackdragon commented on September 28, 2024

You can try using GridSearchCV from sklearn (http://scikit-learn.org/stable/modules/generated/sklearn.grid_search.GridSearchCV.html).
A (almost) example usage here: https://github.com/google/skflow/blob/master/skflow/tests/test_grid_search.py

Otherwise - it's really just an experiments and trying to understand how it changes the quality of the model. There just basic rules of thumb (like start with the same number as original features and then go less and less: e.g. for 500 features you can use [500, 250, 100]). You also want to balance the number of examples you have versus a number of parameters. Usually, you want to have ~10 examples per parameter.

from skflow.

vinhqdang avatar vinhqdang commented on September 28, 2024

Haha, thank you for giving this rule of thumb.

I have to confess that there a lot "rule of thumb" presented in discussion in quora or stackoverflow or researchgate to construct hidden layers in DNN, but let me check with your rule.

from skflow.

vinhqdang avatar vinhqdang commented on September 28, 2024

I think GridSearch in sklearn is similar with h2o.grid in h2o deep learning.

However, the idea is you need to present all the possible hidden_units. We can list 1 000 000 000 different hidden_units and let the computer run, but I am not sure if it is a smart way. (For me it is just a brute force approach - maybe I am wrong)

from skflow.

ilblackdragon avatar ilblackdragon commented on September 28, 2024

There are other hyperparameter optimizers that actually take into account the values and accuracy of the model to pick next values (we use something like this in Google).
For example of Open Source library you can try - http://hyperopt.github.io/hyperopt/

from skflow.

ilblackdragon avatar ilblackdragon commented on September 28, 2024

Hope this helped! I'm closing this bug for now.

from skflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.