mljar / mljar-supervised

Python package for AutoML on Tabular Data with Feature Engineering, Hyper-Parameters Tuning, Explanations and Automatic Documentation
https://mljar.com
MIT License
3k stars 401 forks source link

Error for Ensemble #621

Open junyuyang7 opened 1 year ago

junyuyang7 commented 1 year ago

Error for Ensemble

Input contains NaN, infinity or a value too large for dtype('float64'). Traceback (most recent call last): File "d:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\supervised\base_automl.py", line 1084, in _fit is_stacked=params["is_stacked"] File "d:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\supervised\base_automl.py", line 401, in ensemble_step self.ensemble.fit(oofs, target, sample_weight) File "d:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\supervised\ensemble.py", line 236, in fit score = self.metric(y, y_ens, sample_weight) File "d:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\supervised\utils\metric.py", line 408, in call return self.metric(y_true, y_predicted, sample_weight=sample_weight) File "d:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\supervised\utils\metric.py", line 25, in logloss ll = log_loss(y_true, y_predicted, sample_weight=sample_weight) File "d:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\sklearn\metrics_classification.py", line 2379, in log_loss y_pred = check_array(y_pred, ensure_2d=False) File "d:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\sklearn\utils\validation.py", line 800, in check_array _assert_all_finite(array, allow_nan=force_all_finite == "allow-nan") File "d:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\sklearn\utils\validation.py", line 116, in _assert_all_finite type_err, msg_dtype if msg_dtype is not None else X.dtype ValueError: Input contains NaN, infinity or a value too large for dtype('float64').

Please set a GitHub issue with above error message at: https://github.com/mljar/mljar-supervised/issues/new

How can I do to deal with it?

pplonski commented 1 year ago

Thank you @junyuyang7 for reporting the issue. Is it possible to provide data and code to reproduce the issue? This might be some bug in the code. Thanks!