使用随机森林进行多标签分类

时间:2020-11-02 11:27:05

标签: nlp random-forest text-classification multilabel-classification

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

我尝试使用随机森林分类器。我对该模型有两个输入:tfidf和review_length的输出。

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'

0 个答案:

没有答案