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

Wrong scaling on hyperopt cross parameter plot with non-logarithmic parameters #106

Open
PAUL-BERNARD opened this issue May 3, 2023 · 0 comments
Assignees

Comments

@PAUL-BERNARD
Copy link
Contributor

Cross-scatter plots rendered with plot_hyperopt_report only uses linear or logarithmic scale on both axis.

Here is a short reproducible code snippet that illustrates what's wrong

import reservoirpy
import random
import json
import math

reservoirpy.verbosity(0)

hyperopt_config = {
    "exp": "demo",
    "hp_max_evals": 600,
    "hp_method": "random",
    "instances_per_trial": 1,
    "hp_space": {
        "logarithmic_param": ["loguniform", 1e-5, 1e5],
        "linear_param": ["uniform", 0, 10]
    }
}

with open("./demo.json", "w+") as f:
    json.dump(hyperopt_config, f)

def objective(data, config, *, logarithmic_param, linear_param):
    return {'loss' : math.exp(random.uniform(-3, 0))}

reservoirpy.hyper.research(
    objective=objective,
    dataset=None,
    config_path="./demo.json",
    report_path="./"
)

reservoirpy.hyper.plot_hyperopt_report("./demo/", ("logarithmic_param", "linear_param"), not_log=['linear_param'])

output

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

No branches or pull requests

4 participants