Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ===================================================
- Faces recognition example using eigenfaces and SVMs
- ===================================================
- The dataset used in this example is a preprocessed excerpt of the
- "Labeled Faces in the Wild", aka LFW_:
- http://vis-www.cs.umass.edu/lfw/lfw-funneled.tgz (233MB)
- .. _LFW: http://vis-www.cs.umass.edu/lfw/
- original source: http://scikit-learn.org/stable/auto_examples/applications/face_recognition.html
- 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.
- "This module will be removed in 0.20.", DeprecationWarning)
- 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.
- DeprecationWarning)
- Total dataset size:
- n_samples: 1288
- n_features: 1850
- n_classes: 7
- Extracting the top 150 eigenfaces from 966 faces
- 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.
- warnings.warn(msg, category=DeprecationWarning)
- done in 0.160s
- Projecting the input data on the eigenfaces orthonormal basis
- done in 0.030s
- Fitting the classifier to the training set
- done in 17.668s
- Best estimator found by grid search:
- SVC(C=1000.0, cache_size=200, class_weight='balanced', coef0=0.0,
- decision_function_shape='ovr', degree=3, gamma=0.001, kernel='rbf',
- max_iter=-1, probability=False, random_state=None, shrinking=True,
- tol=0.001, verbose=False)
- Predicting the people names on the testing set
- done in 0.053s
- precision recall f1-score support
- Ariel Sharon 0.56 0.69 0.62 13
- Colin Powell 0.81 0.87 0.84 60
- Donald Rumsfeld 0.70 0.70 0.70 27
- George W Bush 0.91 0.90 0.91 146
- Gerhard Schroeder 0.88 0.84 0.86 25
- Hugo Chavez 0.92 0.73 0.81 15
- Tony Blair 0.88 0.83 0.86 36
- avg / total 0.86 0.85 0.85 322
- [[ 9 0 2 2 0 0 0]
- [ 3 52 0 4 0 1 0]
- [ 4 1 19 2 0 0 1]
- [ 0 8 4 132 1 0 1]
- [ 0 1 0 2 21 0 1]
- [ 0 2 0 0 1 11 1]
- [ 0 0 2 3 1 0 30]]
- Traceback (most recent call last):
- File "C:\Users\Public\Documents\Downloads\ud120-projects-master\pca\eigenedited.py", line 144, in <module>
- for i in range(y_pred.shape[0])]
- NameError: name 'y_pred' is not defined
- [Finished in 21.1s with exit code 1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement