#NEWLINE# @ ignore_warnings #NEWLINE# def test_partial_fit( self ) : #NEWLINE# #INDENT# third = ( X . shape [ 0 ] // 3 ) #NEWLINE# clf = self . factory ( alpha = 0.01 ) #NEWLINE# clf . partial_fit ( X [ : id1 ] , Y [ : third ] ) #NEWLINE# assert_equal ( clf . coef_ . shape , ( X . shape [ 1 ] , ) ) #NEWLINE# assert_equal ( clf . intercept_ . shape , ( 1 , ) ) #NEWLINE# assert_equal ( clf . predict ( [ [ 0 , 0 ] ] ) . shape , ( 1 , ) ) #NEWLINE# id1 = id ( clf . coef_ . data ) #NEWLINE# clf . partial_fit ( X [ third : ] , Y [ third : ] ) #NEWLINE# id2 = id ( clf . coef_ . data ) #NEWLINE# assert_true ( id1 , id2 )