<s> """<STR_LIT>""" <EOL> print ( __doc__ ) <EOL> import numpy as np <EOL> import matplotlib . pyplot as plt <EOL> from sklearn . tree import DecisionTreeRegressor <EOL> rng = np . random . RandomState ( <NUM_LIT:1> ) <EOL> X = np . sort ( <NUM_LIT:200> * rng . rand ( <NUM_LIT:100> , <NUM_LIT:1> ) - <NUM_LIT:100> , axis = <NUM_LIT:0> ) <EOL> y = np . array ( [ np . pi * np . sin ( X ) . ravel ( ) , np . pi * np . cos ( X ) . ravel ( ) ] ) . T <EOL> y [ : : <NUM_LIT:5> , : ] += ( <NUM_LIT:0.5> - rng . rand ( <NUM_LIT:20> , <NUM_LIT:2> ) ) <EOL> regr_1 = DecisionTreeRegressor ( max_depth = <NUM_LIT:2> ) <EOL> regr_2 = DecisionTreeRegressor ( max_depth = <NUM_LIT:5> ) <EOL> regr_3 = DecisionTreeRegressor ( max_depth = <NUM_LIT:8> ) <EOL> regr_1 . fit ( X , y ) <EOL> regr_2 . fit ( X , y ) <EOL> regr_3 . fit ( X , y ) <EOL> X_test = np . arange ( - <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) [ : , np . newaxis ] <EOL> y_1 = regr_1 . predict ( X_test ) <EOL> y_2 = regr_2 . predict ( X_test ) <EOL> y_3 = regr_3 . predict ( X_test ) <EOL> plt . figure ( ) <EOL> s = <NUM_LIT:50> <EOL> plt . scatter ( y [ : , <NUM_LIT:0> ] , y [ : , <NUM_LIT:1> ] , c = "<STR_LIT>" , s = s , label = "<STR_LIT:data>" ) <EOL> plt . scatter ( y_1 [ : , <NUM_LIT:0> ] , y_1 [ : , <NUM_LIT:1> ] , c = "<STR_LIT>" , s = s , label = "<STR_LIT>" ) <EOL> plt . scatter ( y_2 [ : , <NUM_LIT:0> ] , y_2 [ : , <NUM_LIT:1> ] , c = "<STR_LIT:c>" , s = s , label = "<STR_LIT>" ) <EOL> plt . scatter ( y_3 [ : , <NUM_LIT:0> ] , y_3 [ : , <NUM_LIT:1> ] , c = "<STR_LIT>" , s = s , label = "<STR_LIT>" ) <EOL> plt . xlim ( [ - <NUM_LIT:6> , <NUM_LIT:6> ] ) <EOL> plt . ylim ( [ - <NUM_LIT:6> , <NUM_LIT:6> ] ) <EOL> plt . xlabel ( "<STR_LIT>" ) <EOL> plt . ylabel ( "<STR_LIT>" ) <EOL> plt . title ( "<STR_LIT>" ) <EOL> plt . legend ( ) <EOL> plt . show ( ) </s>
