Nlp 基于随机森林的多标签分类

Nlp 基于随机森林的多标签分类,nlp,random-forest,text-classification,multilabel-classification,Nlp,Random Forest,Text Classification,Multilabel Classification,我有5个标签和499个数据集 我试着使用随机森林分类器。我有两个模型输入:tfidf的输出和review_长度 train_tfIdf = vectorizer_tfidf.fit_transform(X_train.values.astype('U')) x_train=['train_tfIdf',question['review_len']] 这是执行时显示的错误: classifier.fit(x_train, y_train) ValueError: could not conver

我有5个标签和499个数据集

我试着使用随机森林分类器。我有两个模型输入:tfidf的输出和review_长度

train_tfIdf = vectorizer_tfidf.fit_transform(X_train.values.astype('U'))
x_train=['train_tfIdf',question['review_len']]
这是执行时显示的错误:

classifier.fit(x_train, y_train)
ValueError: could not convert string to float: 'train_tfIdf'

请尽量减少输入数据,直到生成错误的行作为旁注为止,尝试
x\u train=[train\u tfIdf,question['review\u len']]
,不加引号,看看这是否有帮助