python - sklearn: Turning off warnings -


when i'm fitting sklearn's logisticregression using 1 column python pandas dataframe (not series object), warning:

/library/python/2.7/site-packages/sklearn/preprocessing/label.py:125:          dataconversionwarning: column-vector y passed when 1d array  expected. please change shape of y (n_samples, ), example using  ravel(). y = column_or_1d(y, warn=true) 

i know advert warning in code, how can turn off these warnings?

as posted here,

with warnings.catch_warnings():     warnings.simplefilter("ignore")     # stuff here 

thanks andreas above posting link.


Comments

Popular posts from this blog

c# - ItextSharp font color issue in ver 5.5.4+ -

jquery - Multiple issues with pushstate: history, loading, calling functions -

ios - retrievePeripherals deprecated in IOS7 how to substitude it with retrievePeripheralsWithIdentifiers -