= confusion_matrix(y, pred_knn)
mc_knn mc_knn
array([[882, 425],
[427, 856]])
error_knn = Errores(y, pred_knn)
error_svm = Errores(y, pred_svm)
error_arbol = Errores(y, pred_arbol)
error_bosques = Errores(y, pred_bosques)
error_ada = Errores(y, pred_ada)
errores = pd.concat([
error_knn, error_svm, error_arbol, error_bosques, error_ada], ignore_index = True)
errores.index = ['KNN', 'SVM', 'Árbol', 'Bosques', 'Potenciación']
errores
PG | PLOCAL | PVISITA | |
---|---|---|---|
KNN | 67.10 | 67.48 | 66.72 |
SVM | 84.02 | 84.01 | 84.02 |
Árbol | 75.83 | 75.98 | 75.68 |
Bosques | 83.24 | 83.93 | 82.54 |
Potenciación | 83.01 | 83.93 | 82.07 |
fig = go.Figure()
no_plot = fig.add_trace(go.Bar(x = errores.index, y = errores.PG, name = "Global"))
no_plot = fig.add_trace(go.Bar(x = errores.index, y = errores.PLOCAL, name = "Local"))
no_plot = fig.add_trace(go.Bar(x = errores.index, y = errores.PVISITA, name = "Visita"))
fig.update_layout(title = "Precisiones")
fig.show()