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
Post a Comment