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

Mismatched keywords between TPOT and scikit-learn #1304

Open
nathanWolo opened this issue Jun 19, 2023 · 1 comment
Open

Mismatched keywords between TPOT and scikit-learn #1304

nathanWolo opened this issue Jun 19, 2023 · 1 comment

Comments

@nathanWolo
Copy link

When using verbose=3 on the TPOTRegressor many warnings are given about mismatched keyword arguments, such as GradientBoostingRegressor being passed 'ls' instead of 'squared_error' as the metric during the mutation step.

Examples:

_pre_test decorator: _mate_operator: num_test=0 'str' object has no attribute 'arity'.

_pre_test decorator: _random_mutation_operator: num_test=0 The 'loss' parameter of GradientBoostingRegressor must be a str among {'huber', 'quantile', 'squared_error', 'absolute_error'}. Got 'ls' instead..

_pre_test decorator: _random_mutation_operator: num_test=0 The 'loss' parameter of SGDRegressor must be a str among {'huber', 'squared_epsilon_insensitive', 'epsilon_insensitive', 'squared_error'}. Got 'squared_loss' instead..

_pre_test decorator: _random_mutation_operator: num_test=0 The 'loss' parameter of GradientBoostingRegressor must be a str among {'huber', 'quantile', 'squared_error', 'absolute_error'}. Got 'lad' instead..

Process to reproduce the issue

Fit TPOTRegressor with the newest versions of TPOT and scikit-learn.

Possible fix

Update the kwargs to match what is currently used in scikit-learn (or find an alternative to hard-coding them as string literals)

@perib
Copy link
Contributor

perib commented Jun 19, 2023

The 'arity' error is due to a bug in the TPOT mutation function. I implemented a fix in this pull request #1268

The other errors are due to invalid hyperparameters being included in the config dict found here: https://github.com/EpistasisLab/tpot/blob/master/tpot/config/regressor.py

Should be as easy as just removing the invalid hyperparameters from the list.

@nickotto

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

2 participants