【发布时间】:2015-05-21 12:51:55
【问题描述】:
我有一个为二元分类训练过的模型,我现在想用它来预测未知的类元素。
from sklearn.externals import joblib
model = joblib.load('../model/randomForestModel.pkl')
test_data = df_test.values # df_test is a dataframe with my test data
output = model.predict(test_data[:,1:]) # this outputs the prediction either 1 or 0
在给定训练数据集的情况下,我知道如何获取混淆矩阵、准确度得分、分类报告,但在这种情况下,我没有训练数据。 我想从 weka 那里得到类似的东西:
inst# actual predicted error prediction
1 1:? 1:0 0.757
在 Scikit-learn 中可以吗?如果是这样,我该怎么做?
【问题讨论】:
标签: python scikit-learn prediction