You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following Attribute error:
File "...\Python\Python312\site-packages\optbinning\binning\continuous_binning.py", line 441, in fit
return self._fit(x, y, sample_weight, check_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\Python\Python312\site-packages\optbinning\binning\continuous_binning.py", line 660, in _fit
n_zeros] = self._fit_prebinning(
^^^^^^^^^^^^^^^^^^^^^
File "...\Python\Python312\site-packages\optbinning\binning\binning.py", line 893, in _fit_prebinning
return self._prebinning_refinement(prebinning.splits, x, y, y_missing,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\Python\Python312\site-packages\optbinning\binning\continuous_binning.py", line 855, in _prebinning_refinement
self._max_target_special] = target_info_special_continuous(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\Python\Python312\site-packages\optbinning\binning\binning_statistics.py", line 200, in target_info_special_continuous
std_special.append(0)
^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'append'
when using ContinuousOptimalBinning with special codes as follows:
optb = ContinuousOptimalBinning(name=factor, dtype='numerical', monotonic_trend='auto_asc_desc',max_n_bins=20,
special_codes={'special_5': -5, 'special_6': -6,
'special_7': -7, 'special_9': -9})
The error seems to occur in some cases, for example when no special values are present and only with continuous target. What could be the root cause of this?
Thank you,
Ville
The text was updated successfully, but these errors were encountered:
I get the following Attribute error:
File "...\Python\Python312\site-packages\optbinning\binning\continuous_binning.py", line 441, in fit
return self._fit(x, y, sample_weight, check_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\Python\Python312\site-packages\optbinning\binning\continuous_binning.py", line 660, in _fit
n_zeros] = self._fit_prebinning(
^^^^^^^^^^^^^^^^^^^^^
File "...\Python\Python312\site-packages\optbinning\binning\binning.py", line 893, in _fit_prebinning
return self._prebinning_refinement(prebinning.splits, x, y, y_missing,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\Python\Python312\site-packages\optbinning\binning\continuous_binning.py", line 855, in _prebinning_refinement
self._max_target_special] = target_info_special_continuous(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\Python\Python312\site-packages\optbinning\binning\binning_statistics.py", line 200, in target_info_special_continuous
std_special.append(0)
^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'append'
The text was updated successfully, but these errors were encountered: