<s> """<STR_LIT>""" <EOL> print ( __doc__ ) <EOL> import numpy as np <EOL> import matplotlib . pyplot as plt <EOL> from sklearn . gaussian_process import GaussianProcessClassifier <EOL> from sklearn . gaussian_process . kernels import RBF , DotProduct <EOL> xx , yy = np . meshgrid ( np . linspace ( - <NUM_LIT:3> , <NUM_LIT:3> , <NUM_LIT:50> ) , <EOL> np . linspace ( - <NUM_LIT:3> , <NUM_LIT:3> , <NUM_LIT:50> ) ) <EOL> rng = np . random . RandomState ( <NUM_LIT:0> ) <EOL> X = rng . randn ( <NUM_LIT:200> , <NUM_LIT:2> ) <EOL> Y = np . logical_xor ( X [ : , <NUM_LIT:0> ] > <NUM_LIT:0> , X [ : , <NUM_LIT:1> ] > <NUM_LIT:0> ) <EOL> plt . figure ( figsize = ( <NUM_LIT:10> , <NUM_LIT:5> ) ) <EOL> kernels = [ <NUM_LIT:1.0> * RBF ( length_scale = <NUM_LIT:1.0> ) , <NUM_LIT:1.0> * DotProduct ( sigma_0 = <NUM_LIT:1.0> ) ** <NUM_LIT:2> ] <EOL> for i , kernel in enumerate ( kernels ) : <EOL> clf = GaussianProcessClassifier ( kernel = kernel , warm_start = True ) . fit ( X , Y ) <EOL> Z = clf . predict_proba ( np . vstack ( ( xx . ravel ( ) , yy . ravel ( ) ) ) . T ) [ : , <NUM_LIT:1> ] <EOL> Z = Z . reshape ( xx . shape ) <EOL> plt . subplot ( <NUM_LIT:1> , <NUM_LIT:2> , i + <NUM_LIT:1> ) <EOL> image = plt . imshow ( Z , interpolation = '<STR_LIT>' , <EOL> extent = ( xx . min ( ) , xx . max ( ) , yy . min ( ) , yy . max ( ) ) , <EOL> aspect = '<STR_LIT>' , origin = '<STR_LIT>' , cmap = plt . cm . PuOr_r ) <EOL> contours = plt . contour ( xx , yy , Z , levels = [ <NUM_LIT:0> ] , linewidths = <NUM_LIT:2> , <EOL> linetypes = '<STR_LIT>' ) <EOL> plt . scatter ( X [ : , <NUM_LIT:0> ] , X [ : , <NUM_LIT:1> ] , s = <NUM_LIT:30> , c = Y , cmap = plt . cm . Paired ) <EOL> plt . xticks ( ( ) ) <EOL> plt . yticks ( ( ) ) <EOL> plt . axis ( [ - <NUM_LIT:3> , <NUM_LIT:3> , - <NUM_LIT:3> , <NUM_LIT:3> ] ) <EOL> plt . colorbar ( image ) <EOL> plt . title ( "<STR_LIT>" <EOL> % ( clf . kernel_ , clf . log_marginal_likelihood ( clf . kernel_ . theta ) ) , <EOL> fontsize = <NUM_LIT:12> ) <EOL> plt . tight_layout ( ) <EOL> plt . show ( ) </s>
