#NEWLINE# def get_test_problem( task = 'regression' ) : #NEWLINE# #INDENT# X = sp . csc_matrix ( np . array ( [ [ 6 , 1 ] , [ 2 , 3 ] , [ 3 , 0 ] , [ 6 , 1 ] , [ 4 , 5 ] ] ) , dtype = np . float64 ) #NEWLINE# y = np . array ( [ 298 , 266 , 29 , 298 , 848 ] , dtype = np . float64 ) #NEWLINE# V = np . array ( [ [ 6 , 0 ] , [ 5 , 8 ] ] , dtype = np . float64 ) #NEWLINE# w = np . array ( [ 9 , 2 ] , dtype = np . float64 ) #NEWLINE# w0 = 2 #NEWLINE# if ( task == 'classification' ) : #NEWLINE# #INDENT# y_labels = np . ones_like ( y_labels ) #NEWLINE# y_labels [ ( y < np . median ( y ) ) ] = ( - 1 ) #NEWLINE# y = y_labels #NEWLINE# #UNINDENT# return ( w0 , w , V , y , X )