#NEWLINE# def test_make_regression( ) : #NEWLINE# #INDENT# ( X , y , c ) = make_regression ( n_samples = 100 , n_features = 10 , n_informative = 3 , effective_rank = 5 , coef = True , bias = 0.0 , noise = 1.0 , random_state = 0 ) #NEWLINE# assert_equal ( X . shape , ( 100 , 10 ) , 'X shape mismatch' ) #NEWLINE# assert_equal ( y . shape , ( 100 , ) , 'y shape mismatch' ) #NEWLINE# assert_equal ( c . shape , ( 10 , ) , 'coef shape mismatch' ) #NEWLINE# assert_equal ( sum ( ( c != 0.0 ) ) , 3 , 'Unexpected number of informative features' ) #NEWLINE# assert_almost_equal ( np . std ( ( y - np . dot ( X , c ) ) ) , 1.0 , decimal = 1 ) #NEWLINE# ( X , y ) = make_regression ( n_samples = 100 , n_features = 1 ) #NEWLINE# assert_equal ( X . shape , ( 100 , 1 ) )