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
and right before that a warning regarding a division by zero (RuntimeWarning: divide by zero encountered in log).
Looking at the binning created by this function, by printing the return value with return_distr_dat=True:
{'psi':
variable PSI
0 score inf,
'pic': {},
'dat': {'score':
bin N badprob
ae test train test train
0 [300,350) NaN 1.0 NaN 0.000000
1 [350,400) 6257.0 6216.0 0.560332 0.563224
2 [400,500) 2733.0 2775.0 0.361873 0.358559
}}
We see that the first bin shows only one sample for the training set and no samples for the test set, hence, probably, the error, since in the following part of the code we see that when pivoting the table in line 518, if there are no samples for a certain bin in one of the sets, there is no row to pivot.
Therefore, there will only be one column, leading to the indexer being out-of-bounds.
In case I got it correctly, I suggest either enforcing an empty record in case there is a bin with no samples, adjusting the bins so that there are always samples or even perhaps allowing for custom bins to be used.
Otherwise, I would appreciate your support in this matter. Thanks you!
The text was updated successfully, but these errors were encountered:
When calling function
perf_psi()
withshow_plot=True
, i got this error:IndexError: single positional indexer is out-of-bounds
on
distr_prob.distr.iloc[:,1]
in line 532:and right before that a warning regarding a division by zero (
RuntimeWarning: divide by zero encountered in log
).Looking at the binning created by this function, by printing the return value with
return_distr_dat=True
:We see that the first bin shows only one sample for the training set and no samples for the test set, hence, probably, the error, since in the following part of the code we see that when pivoting the table in line 518, if there are no samples for a certain bin in one of the sets, there is no row to pivot.
Therefore, there will only be one column, leading to the indexer being out-of-bounds.
In case I got it correctly, I suggest either enforcing an empty record in case there is a bin with no samples, adjusting the bins so that there are always samples or even perhaps allowing for custom bins to be used.
Otherwise, I would appreciate your support in this matter. Thanks you!
The text was updated successfully, but these errors were encountered: