def make_friedman1(n_samples=100, n_features=10, noise=0.0, random_state=None):
 if (n_features < 5):
  raise ValueError('n_features must be at least five.')
 generator = check_random_state(random_state)
 X = generator.rand(n_samples, n_features)
 y = (((((10 * np.sin(((np.pi * X[:, 0]) * X[:, 1]))) + (20 * ((X[:, 2] - 0.5) ** 2))) + (10 * X[:, 3])) + (5 * X[:, 4])) + (noise * generator.randn(n_samples)))
 return (X, y)

def make_friedman1 ( n_samples = 100 , n_features = 10 , noise = 0.0 , random_state = None ) : if ( n_features < 5 ) : raise ValueError ( 'n_features must be at least five.' ) generator = check_random_state ( random_state ) X = generator . rand ( n_samples , n_features ) y = ( ( ( ( ( 10 * np . sin ( ( ( np . pi * X [ : , 0 ] ) * X [ : , 1 ] ) ) ) + ( 20 * ( ( X [ : , 2 ] - 0.5 ) ** 2 ) ) ) + ( 10 * X [ : , 3 ] ) ) + ( 5 * X [ : , 4 ] ) ) + ( noise * generator . randn ( n_samples ) ) ) return ( X , y )
generate the "friedman #1" regression problem this dataset is described in friedman [1] and breiman [2] .