<s> """<STR_LIT>""" <EOL> print ( __doc__ ) <EOL> from time import time <EOL> import matplotlib . pyplot as plt <EOL> from sklearn . datasets import fetch_olivetti_faces <EOL> from sklearn . ensemble import ExtraTreesClassifier <EOL> n_jobs = <NUM_LIT:1> <EOL> data = fetch_olivetti_faces ( ) <EOL> X = data . images . reshape ( ( len ( data . images ) , - <NUM_LIT:1> ) ) <EOL> y = data . target <EOL> mask = y < <NUM_LIT:5> <EOL> X = X [ mask ] <EOL> y = y [ mask ] <EOL> print ( "<STR_LIT>" % n_jobs ) <EOL> t0 = time ( ) <EOL> forest = ExtraTreesClassifier ( n_estimators = <NUM_LIT:1000> , <EOL> max_features = <NUM_LIT> , <EOL> n_jobs = n_jobs , <EOL> random_state = <NUM_LIT:0> ) <EOL> forest . fit ( X , y ) <EOL> print ( "<STR_LIT>" % ( time ( ) - t0 ) ) <EOL> importances = forest . feature_importances_ <EOL> importances = importances . reshape ( data . images [ <NUM_LIT:0> ] . shape ) <EOL> plt . matshow ( importances , cmap = plt . cm . hot ) <EOL> plt . title ( "<STR_LIT>" ) <EOL> plt . show ( ) </s>
