Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. grid = GridSearchCV(pipe, param_grid, cv=5)
  2. grille=grid.fit(text_train, Y_train)
  3. y_pred = grille.predict(text_test)
  4. from sklearn import metrics
  5. #matrice de confusion
  6. print("matrice confusion")
  7. print(metrics.confusion_matrix(Y_test,y_pred))
  8. #succès en test
  9. print("score accuracy")
  10. print(metrics.accuracy_score(Y_test,y_pred))
  11.  
  12. [[ 0 0 0 0 0 0 0 0 0 0 27 2]
  13. [ 0 0 0 0 0 0 0 0 0 0 88 23]
  14. [ 0 0 0 0 0 0 0 0 0 0 12 0]
  15. [ 0 0 0 0 0 0 0 0 0 0 22 4]
  16. [ 0 0 0 0 0 0 0 0 0 0 108 90]
  17. [ 0 0 0 0 0 0 0 0 0 0 28 60]
  18. [ 0 0 0 0 0 0 0 0 0 0 16 94]
  19. [ 0 0 0 0 0 0 0 0 0 0 49 424]
  20. [ 0 0 0 0 0 0 0 0 0 0 5 76]
  21. [ 0 0 0 0 0 0 0 0 0 0 78 1487]
  22. [ 0 0 0 0 0 0 0 0 0 0 0 0]
  23. [ 0 0 0 0 0 0 0 0 0 0 0 0]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement