I get an “ ValueError: Cannot sample 57592 out of arrays with dim 0 when replace is False” error when trying to downsample

前端 未结 0 990
余生分开走
余生分开走 2021-02-15 06:06
 from sklearn.utils import resample
 df_maj = df[df.SEVERITYCODE == 1]
 df_min = df[df.SEVERITYCODE == 2]

 df_majdown = resample(df_maj, replace = False, n_samples = 57         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题