我想从X_4_test获得与获得的FPR相对应的数据点或行

时间:2019-06-22 06:40:08

标签: python data-science decision-tree confusion-matrix

我想从X_4_test中提取数据点,该数据点在执行Confusion matrix后给出了FPR的结果。我从混乱矩阵中获得了fpr。但是如何从X_4_test获取数据点,这有助于fpr。我正在分享获得fpr的代码。我无法编写代码来从X_4_test获取与fpr相对应的数据点。

clf = DecisionTreeClassifier(criterion='gini', max_depth= let_depth  , 
min_samples_split= let_split , class_weight = 'balanced')
clf.fit(X_4_train, y_train)


y_train_4_pred = clf.predict(X_4_train) 
y_test_4_pred = clf.predict(X_4_test)

train_fpr_4, train_tpr_4, tr_thresholds = roc_curve(y_train, 
y_train_4_pred)
test_fpr_4, test_tpr_4, te_thresholds = roc_curve(y_test, y_test_4_pred)

0 个答案:

没有答案