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
it's because np.quantilehas problem. Quantile function determines boundary by (a+b)/2, but (a+np.Inf)/2 equals np.NaN
codes below can solve the problem.
boundaries = np.unique(
np.quantile(x, np.arange(0, 1, 1/initial_intervals)[1:])
) # Add [1:] so that 0% persentile will not be a threshold
boundaries=boundaries[~np.isnan(boundaries)]
if np.Inf in x:
boundaries=np.append(boundaries,np.Inf)
if np.NINF in x:
boundaries=np.append(boundaries,np.NINF)
boundaries.sort(axis=0)
The text was updated successfully, but these errors were encountered:
it's because np.quantilehas problem. Quantile function determines boundary by (a+b)/2, but (a+np.Inf)/2 equals np.NaN
codes below can solve the problem.
The text was updated successfully, but these errors were encountered: