Giter Club home page Giter Club logo

Comments (4)

aaronkl avatar aaronkl commented on May 18, 2024

Can you elaborate a bit more on your use-case? Do you want to search jointly for the right algorithm and hyperparameters?

from syne-tune.

WZFish avatar WZFish commented on May 18, 2024

the use-case is maybe there is one dataset, and I want to parallel find 5 algorithms hyperparameters, these 5 algorithms is independent each other. It means I start 5 ray actors for 5 algorithms to find hyperparameters. Before when I use ray.tune to do it. 5 ray.tune will mix the hyperparam each other.

from syne-tune.

aaronkl avatar aaronkl commented on May 18, 2024

What you could do is to define one categorical hyperparameter that defines the algorithm. Then you define all hyperparameters for your algorithms. For example, it could look like this:

config_space = {
    "algorithm_type": choice(['rf', 'xgb']),
    "learning_rate_xgb": loguniform(1e-6, 1e-1),
    "n_estimators_rf": randint(10, 500),
    "min_samples_split_rf": randint((1, 50))
}

Now, in your train function, you first check which algorithm to use and then pass it the corresponding hyperparameters. For example:

if algorithm_type == 'xgb':
    model = xgboost.XGBClassifier(learning_rate=learning_rate_xgb)
elif algorithm_type == 'rf':
    model = RandomForestClassifier(min_samples_split=min_samples_split_rf, n_estimators=n_estimators_rf)

This might be not the most efficient way, but as long as you use a random-search based method such as ASHA it should work.

from syne-tune.

aaronkl avatar aaronkl commented on May 18, 2024

Feel free to reopen if there are further questions

from syne-tune.

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.