классификация, когда я ввожу numpy массивы с тестовой меткой и тестовыми вероятностями, выдается следующая ошибка:
dataset = read_csv('C:/.../dataset/KDDREAL.csv')
dataset = dataset.values
X = dataset[:, :-1]
Y = dataset[:, -1]
encoder = LabelEncoder().fit(Y)
encoded_Y = encoder.transform(Y)
X_train, X_test, Y_train, Y_test = train_test_split(X , encoded_Y , test_size=0.3, random_state=0)
model_svm = svm.SVC()
model_svm.fit(X_train, Y_train)
results_svm = model_svm.predict(X_test)
fpr2 = dict()
tpr2 = dict()
roc_auc2 = dict()
for i in range(num_classes):
fpr2[i], tpr2[i], _ = roc_curve(Y_test , results_svm[:, i])
roc_auc2[i] = auc(fpr2[i], tpr2[i])
# Compute micro-average ROC curve and ROC area
fpr2, tpr2, _ = roc_curve(y_test.ravel(), PGD20_X_test_trm.ravel())
roc_auc2 = auc(fpr2, tpr2)
fpr2[i], tpr2[i], _ = roc_curve(Y_test , results_svm[:, i])
IndexError: too many indices for array