小编Dbe*_*les的帖子

SMOTE初始化期望n_neighbors <= n_samples,但n_samples <n_neighbors

我已经预先清理了数据,下面显示了前4行的格式:

     [IN] df.head()

    [OUT]   Year    cleaned
         0  1909    acquaint hous receiv follow letter clerk crown...
         1  1909    ask secretari state war whether issu statement...
         2  1909    i beg present petit sign upward motor car driv...
         3  1909    i desir ask secretari state war second lieuten...
         4  1909    ask secretari state war whether would introduc...
Run Code Online (Sandbox Code Playgroud)

我已将train_test_split()称为如下:

     [IN] X_train, X_test, y_train, y_test = train_test_split(df['cleaned'], df['Year'], random_state=2)
   [Note*] `X_train` and `y_train` are now Pandas.core.series.Series of shape (1785,) and `X_test` and `y_test` are also …
Run Code Online (Sandbox Code Playgroud)

tf-idf knn scikit-learn oversampling imblearn

2
推荐指数
2
解决办法
4977
查看次数

标签 统计

imblearn ×1

knn ×1

oversampling ×1

scikit-learn ×1

tf-idf ×1