Skip to content
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

Implement Tunable from_dict #150

Closed
pvk-developer opened this issue Dec 9, 2019 · 0 comments · Fixed by #149
Closed

Implement Tunable from_dict #150

pvk-developer opened this issue Dec 9, 2019 · 0 comments · Fixed by #149
Assignees
Milestone

Comments

@pvk-developer
Copy link
Collaborator

Create a function that recieves as an input python dict with information about hyperparameters.
This function will create an instance of a btb.tunable.Tunable in order to be used by the Tuner.

Input example would be:

from btb.tuning.tunable import Tunable

hyperparams = {
    "n_estimators": {
        "type": "int",
        "default": 10,
        "range": [
            1,
            500
        ]
    },
    "min_weight_fraction_leaf": {
        "type": "float",
        "default": 0.0,
        "range": [
            0.0,
            0.5
        ]
    },
    "criterion": {
        "type": "str",
        "default": "gini",
        "values": [
            "entropy",
            "gini"
        ]
    },
    "max_features": {
        "type": "str",
        "default": None,
        "values": [
            None,
            "auto",
            "log2",
            "sqrt"
        ]
    },
    "bootstrap": {
        "type": "bool",
        "default": True,
    },
}

tunable = Tunable.from_dict(hyperparams)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant