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

Problem about param ml_task="regression", #643

Open
jiaqizheng2000 opened this issue Aug 8, 2023 · 9 comments
Open

Problem about param ml_task="regression", #643

jiaqizheng2000 opened this issue Aug 8, 2023 · 9 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@jiaqizheng2000
Copy link

If I use this param, it will raise an issue below for all of the model, if it is deleted, the model works fine.

'<' not supported between instances of 'numpy.ndarray' and 'str'
Traceback (most recent call last):
File "C:\Users\ZHENGJ\AppData\Local\Programs\Python\Python39\lib\site-packages\supervised\base_automl.py", line 1195, in _fit
trained = self.train_model(params)
File "C:\Users\ZHENGJ\AppData\Local\Programs\Python\Python39\lib\site-packages\supervised\base_automl.py", line 404, in train_model
self.keep_model(mf, model_subpath)
File "C:\Users\ZHENGJ\AppData\Local\Programs\Python\Python39\lib\site-packages\supervised\base_automl.py", line 317, in keep_model
self.select_and_save_best()
File "C:\Users\ZHENGJ\AppData\Local\Programs\Python\Python39\lib\site-packages\supervised\base_automl.py", line 1315, in select_and_save_best
self._best_model = min(
TypeError: '<' not supported between instances of 'numpy.ndarray' and 'str'

@Benjamin-Frost
Copy link

Same issue here. Did you manage to resolve it?

@pplonski
Copy link
Contributor

pplonski commented Jan 8, 2024

Hi @jiaqizheng2000, @Benjamin-Frost,
Could you please provide code to reproduce the issue? Thank you!

@jiaqizheng2000
Copy link
Author

automl = AutoML(
                ml_task="regression",
                train_ensemble=True,
                fairness_threshold=0.8,
                results_path=resultpath,
                model_time_limit=30 * 60,
                start_random_models=10,
                top_models_to_improve=3,
                hill_climbing_steps=3,
                golden_features=True,
                features_selection=False,
                stack_models=True,
                explain_level=2,
                validation_strategy={
                    "validation_type": "kfold",
                    "k_folds": 4,
                    "shuffle": False,
                    "stratify": True,}
     )
automl.fit(x_train, y_train)

@pplonski
Copy link
Contributor

pplonski commented Jan 9, 2024

Could you please share dataset as well? or maybe data sample, do you have this error on synthetic data as well?

@jiaqizheng2000
Copy link
Author

example.xlsx

@pplonski
Copy link
Contributor

pplonski commented Jan 9, 2024

Thank you! How do you load code and prepare X_train and y_train variables?

@jiaqizheng2000
Copy link
Author

Simply choose the first column as y_train, and the rest as X_train

@pplonski pplonski added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Jan 9, 2024
@pplonski pplonski pinned this issue Jan 9, 2024
@Rohan581
Copy link

Rohan581 commented Feb 3, 2024

@pplonski I Would like to work on this issue

@pplonski
Copy link
Contributor

pplonski commented Feb 3, 2024

Sure @Rohan581, thanks!

@pplonski pplonski assigned pplonski and Rohan581 and unassigned pplonski Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants