<s> """<STR_LIT>""" <EOL> from warnings import warn <EOL> import numpy as np <EOL> from . . preprocessing import LabelBinarizer <EOL> from . . utils . validation import check_consistent_length , check_array <EOL> from . . utils . extmath import safe_sparse_dot <EOL> def l1_min_c ( X , y , loss = '<STR_LIT>' , fit_intercept = True , <EOL> intercept_scaling = <NUM_LIT:1.0> ) : <EOL> """<STR_LIT>""" <EOL> if loss == "<STR_LIT>" : <EOL> warn ( "<STR_LIT>" <EOL> "<STR_LIT>" , <EOL> DeprecationWarning ) <EOL> loss = "<STR_LIT>" <EOL> if loss not in ( '<STR_LIT>' , '<STR_LIT>' ) : <EOL> raise ValueError ( '<STR_LIT>' ) <EOL> X = check_array ( X , accept_sparse = '<STR_LIT>' ) <EOL> check_consistent_length ( X , y ) <EOL> Y = LabelBinarizer ( neg_label = - <NUM_LIT:1> ) . fit_transform ( y ) . T <EOL> den = np . max ( np . abs ( safe_sparse_dot ( Y , X ) ) ) <EOL> if fit_intercept : <EOL> bias = intercept_scaling * np . ones ( ( np . size ( y ) , <NUM_LIT:1> ) ) <EOL> den = max ( den , abs ( np . dot ( Y , bias ) ) . max ( ) ) <EOL> if den == <NUM_LIT:0.0> : <EOL> raise ValueError ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> if loss == '<STR_LIT>' : <EOL> return <NUM_LIT:0.5> / den <EOL> else : <EOL> return <NUM_LIT> / den </s>
