<s> """<STR_LIT>""" <EOL> print ( __doc__ ) <EOL> import numpy as np <EOL> import matplotlib . pyplot as plt <EOL> from mpl_toolkits . mplot3d import Axes3D <EOL> from sklearn import decomposition <EOL> from sklearn import datasets <EOL> np . random . seed ( <NUM_LIT:5> ) <EOL> centers = [ [ <NUM_LIT:1> , <NUM_LIT:1> ] , [ - <NUM_LIT:1> , - <NUM_LIT:1> ] , [ <NUM_LIT:1> , - <NUM_LIT:1> ] ] <EOL> iris = datasets . load_iris ( ) <EOL> X = iris . data <EOL> y = iris . target <EOL> fig = plt . figure ( <NUM_LIT:1> , figsize = ( <NUM_LIT:4> , <NUM_LIT:3> ) ) <EOL> plt . clf ( ) <EOL> ax = Axes3D ( fig , rect = [ <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT:1> ] , elev = <NUM_LIT> , azim = <NUM_LIT> ) <EOL> plt . cla ( ) <EOL> pca = decomposition . PCA ( n_components = <NUM_LIT:3> ) <EOL> pca . fit ( X ) <EOL> X = pca . transform ( X ) <EOL> for name , label in [ ( '<STR_LIT>' , <NUM_LIT:0> ) , ( '<STR_LIT>' , <NUM_LIT:1> ) , ( '<STR_LIT>' , <NUM_LIT:2> ) ] : <EOL> ax . text3D ( X [ y == label , <NUM_LIT:0> ] . mean ( ) , <EOL> X [ y == label , <NUM_LIT:1> ] . mean ( ) + <NUM_LIT> , <EOL> X [ y == label , <NUM_LIT:2> ] . mean ( ) , name , <EOL> horizontalalignment = '<STR_LIT>' , <EOL> bbox = dict ( alpha = <NUM_LIT> , edgecolor = '<STR_LIT:w>' , facecolor = '<STR_LIT:w>' ) ) <EOL> y = np . choose ( y , [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:0> ] ) . astype ( np . float ) <EOL> ax . scatter ( X [ : , <NUM_LIT:0> ] , X [ : , <NUM_LIT:1> ] , X [ : , <NUM_LIT:2> ] , c = y , cmap = plt . cm . spectral ) <EOL> ax . w_xaxis . set_ticklabels ( [ ] ) <EOL> ax . w_yaxis . set_ticklabels ( [ ] ) <EOL> ax . w_zaxis . set_ticklabels ( [ ] ) <EOL> plt . show ( ) </s>
