在我使用随机森林开发我的预测模型后,我得到以下指标:
Train Accuracy :: 0.9764634601043997
Test Accuracy :: 0.7933284397683713
Confusion matrix [[28292 1474]
[ 6128 889]]
这是这段代码的结果:
training_features, test_features, training_target, test_target, = train_test_split(df.drop(['bad_loans'], axis=1),
df['target'],
test_size = .3,
random_state=12)
clf = RandomForestClassifier()
trained_model = clf.fit(training_features, training_target)
trained_model.fit(training_features, training_target)
predictions = trained_model.predict(test_features)
Train Accuracy: accuracy_score(training_target, trained_model.predict(training_features))
Test Accuracy: accuracy_score(test_target, predictions)
Confusion Matrix: confusion_matrix(test_target, predictions)
但是,我对解释和解释这些值感到有些困惑。
这 3 项措施究竟告诉了我关于我的模型的什么信息?
谢谢!