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

trained error #703

Open
jungjongho opened this issue Feb 3, 2024 · 2 comments
Open

trained error #703

jungjongho opened this issue Feb 3, 2024 · 2 comments

Comments

@jungjongho
Copy link

automl = AutoML(
algorithms=["CatBoost", "Xgboost", "LightGBM"],
mode="Compete",
ml_task="multiclass_classification",
eval_metric='f1',
random_state=42,
total_time_limit=14400,
model_time_limit=None,
)

#모델 학습
automl.fit(df_preprocess, df_y_data_encoded)

df_preprocess => (96294,15)
df_y_data_encoded.distinct() => 0,1,2,3,4,5,6

cannot reshape array of size 606648 into shape (12380,7) Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/supervised/base_automl.py", line 1195, in fit trained = self.train_model(params) File "/usr/local/lib/python3.10/dist-packages/supervised/base_automl.py", line 401, in train_model mf.train(results_path, model_subpath) File "/usr/local/lib/python3.10/dist-packages/supervised/model_framework.py", line 254, in train learner.fit( File "/usr/local/lib/python3.10/dist-packages/supervised/algorithms/lightgbm.py", line 237, in fit self.model = lgb.train( File "/usr/local/lib/python3.10/dist-packages/lightgbm/engine.py", line 282, in train evaluation_result_list.extend(booster.eval_train(feval)) File "/usr/local/lib/python3.10/dist-packages/lightgbm/basic.py", line 3892, in eval_train return self.inner_eval(self._train_data_name, 0, feval) File "/usr/local/lib/python3.10/dist-packages/lightgbm/basic.py", line 4635, in __inner_eval feval_ret = eval_function(self.inner_predict(data_idx), cur_data) File "/usr/local/lib/python3.10/dist-packages/supervised/utils/metric.py", line 214, in lightgbm_eval_metric_f1 preds = np.reshape(preds, (rows, cols), order="F") File "<_array_function internals>", line 180, in reshape File "/usr/local/lib/python3.10/dist-packages/numpy/core/fromnumeric.py", line 298, in reshape return _wrapfunc(a, 'reshape', newshape, order=order) File "/usr/local/lib/python3.10/dist-packages/numpy/core/fromnumeric.py", line 57, in _wrapfunc return bound(args, *kwds) ValueError: cannot reshape array of size 606648 into shape (12380,7)

@pplonski
Copy link
Contributor

pplonski commented Feb 5, 2024

Thank you @jungjongho for reporting. I

@sumantabasak
Copy link

sumantabasak commented Jun 1, 2024

I'm having same issue. @pplonski can you please look into this? The issue seems to be for 'LightGBM'.

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

3 participants