Skip to content

fix: issue of running automl in SVM and Decision Tree #429

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions geochemistrypi/data_mining/model/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,10 @@ def __init__(self, task="regression", n_jobs=None, **config):
@classmethod
def search_space(cls, data_size, task):
space = {
"criterion": {"domain": tune.choice(["squared_error", "friedman_mse", "absolute_error", "poisson"])},
# "criterion": {"domain": tune.choice(["squared_error", "friedman_mse", "absolute_error", "poisson"])},
# TODO: Handle the issue of 'poisson' not supporting negative values. This workaround excludes 'poisson' for now.
# Future work: If required, implement a solution to support negative values for 'poisson' or handle them dynamically.
"criterion": {"domain": tune.choice(["squared_error", "friedman_mse", "absolute_error"])},
"max_depth": {"domain": tune.randint(lower=2, upper=20), "init_value": 1, "low_cost_init_value": 1},
"min_samples_split": {
"domain": tune.randint(lower=2, upper=10),
Expand Down Expand Up @@ -1738,7 +1741,10 @@ def __init__(self, task="regression", n_jobs=None, **config):
def search_space(cls, data_size, task):
space = {
"C": {"domain": tune.uniform(lower=1, upper=data_size[0]), "init_value": 1, "low_cost_init_value": 1},
"kernel": {"domain": tune.choice(["poly", "rbf", "sigmoid"])},
# "kernel": {"domain": tune.choice(["poly", "rbf", "sigmoid"])},
# TODO: Exclude 'poly' kernel due to its slow search speed and negative impact on framework performance.
# Future work: Reevaluate kernel options if performance requirements change or improvements are made to handle 'poly' more efficiently.
"kernel": {"domain": tune.choice(["rbf", "sigmoid"])},
"gamma": {"domain": tune.uniform(lower=1e-5, upper=10), "init_value": 1e-1, "low_cost_init_value": 1e-1},
"degree": {"domain": tune.quniform(lower=1, upper=5, q=1), "init_value": 3, "low_cost_init_value": 3},
"coef0": {"domain": tune.uniform(lower=0, upper=1), "init_value": 0, "low_cost_init_value": 0},
Expand Down