Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.13 KB | None | 0 0
  1.  
  2. ===================================================
  3. Faces recognition example using eigenfaces and SVMs
  4. ===================================================
  5.  
  6. The dataset used in this example is a preprocessed excerpt of the
  7. "Labeled Faces in the Wild", aka LFW_:
  8.  
  9. http://vis-www.cs.umass.edu/lfw/lfw-funneled.tgz (233MB)
  10.  
  11. .. _LFW: http://vis-www.cs.umass.edu/lfw/
  12.  
  13. original source: http://scikit-learn.org/stable/auto_examples/applications/face_recognition.html
  14.  
  15.  
  16. C:\Python27\lib\site-packages\sklearn\cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
  17. "This module will be removed in 0.20.", DeprecationWarning)
  18. C:\Python27\lib\site-packages\sklearn\grid_search.py:42: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. This module will be removed in 0.20.
  19. DeprecationWarning)
  20. Total dataset size:
  21. n_samples: 1288
  22. n_features: 1850
  23. n_classes: 7
  24. Extracting the top 150 eigenfaces from 966 faces
  25. C:\Python27\lib\site-packages\sklearn\utils\deprecation.py:57: DeprecationWarning: Class RandomizedPCA is deprecated; RandomizedPCA was deprecated in 0.18 and will be removed in 0.20. Use PCA(svd_solver='randomized') instead. The new implementation DOES NOT store whiten ``components_``. Apply transform to get them.
  26. warnings.warn(msg, category=DeprecationWarning)
  27. done in 0.160s
  28. Projecting the input data on the eigenfaces orthonormal basis
  29. done in 0.030s
  30. Fitting the classifier to the training set
  31. done in 17.668s
  32. Best estimator found by grid search:
  33. SVC(C=1000.0, cache_size=200, class_weight='balanced', coef0=0.0,
  34. decision_function_shape='ovr', degree=3, gamma=0.001, kernel='rbf',
  35. max_iter=-1, probability=False, random_state=None, shrinking=True,
  36. tol=0.001, verbose=False)
  37. Predicting the people names on the testing set
  38. done in 0.053s
  39. precision recall f1-score support
  40.  
  41. Ariel Sharon 0.56 0.69 0.62 13
  42. Colin Powell 0.81 0.87 0.84 60
  43. Donald Rumsfeld 0.70 0.70 0.70 27
  44. George W Bush 0.91 0.90 0.91 146
  45. Gerhard Schroeder 0.88 0.84 0.86 25
  46. Hugo Chavez 0.92 0.73 0.81 15
  47. Tony Blair 0.88 0.83 0.86 36
  48.  
  49. avg / total 0.86 0.85 0.85 322
  50.  
  51. [[ 9 0 2 2 0 0 0]
  52. [ 3 52 0 4 0 1 0]
  53. [ 4 1 19 2 0 0 1]
  54. [ 0 8 4 132 1 0 1]
  55. [ 0 1 0 2 21 0 1]
  56. [ 0 2 0 0 1 11 1]
  57. [ 0 0 2 3 1 0 30]]
  58. Traceback (most recent call last):
  59. File "C:\Users\Public\Documents\Downloads\ud120-projects-master\pca\eigenedited.py", line 144, in <module>
  60. for i in range(y_pred.shape[0])]
  61. NameError: name 'y_pred' is not defined
  62. [Finished in 21.1s with exit code 1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement