1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
=========================
Putting it all together
=========================
.. Imports
>>> import numpy as np
Pipelining
============
We have seen that some estimators can transform data and that some estimators
can predict variables. We can also create combined estimators:
.. image:: ../../auto_examples/compose/images/sphx_glr_plot_digits_pipe_001.png
:target: ../../auto_examples/compose/plot_digits_pipe.html
:scale: 65
:align: right
.. literalinclude:: ../../auto_examples/compose/plot_digits_pipe.py
:lines: 23-63
Face recognition with eigenfaces
=================================
The dataset used in this example is a preprocessed excerpt of the
"Labeled Faces in the Wild", also known as LFW_:
http://vis-www.cs.umass.edu/lfw/lfw-funneled.tgz (233MB)
.. _LFW: http://vis-www.cs.umass.edu/lfw/
.. literalinclude:: ../../auto_examples/applications/plot_face_recognition.py
.. |prediction| image:: ../../images/plot_face_recognition_1.png
:scale: 50
.. |eigenfaces| image:: ../../images/plot_face_recognition_2.png
:scale: 50
.. list-table::
:class: centered
*
- |prediction|
- |eigenfaces|
*
- **Prediction**
- **Eigenfaces**
Expected results for the top 5 most represented people in the dataset::
precision recall f1-score support
Gerhard_Schroeder 0.91 0.75 0.82 28
Donald_Rumsfeld 0.84 0.82 0.83 33
Tony_Blair 0.65 0.82 0.73 34
Colin_Powell 0.78 0.88 0.83 58
George_W_Bush 0.93 0.86 0.90 129
avg / total 0.86 0.84 0.85 282
Open problem: Stock Market Structure
=====================================
Can we predict the variation in stock prices for Google over a given time frame?
:ref:`stock_market`
|