On 21 October 2012 19:41, Wei LI <kuant...@gmail.com> wrote:
> Dear All:
>
> Will scikit-learn suppress the same user warning to avoid multiple
> warnings by design? For example, the following this gist
> https://gist.github.com/3926327, I will get three warnings actually
> rather than four warnings so I think it is due to warning filter. This a
> little problematics when scripting with ipython shell where if we have the
> first warnings we will never have it again :(
>
> --
> LI, Wei
> Tsinghua/CUHK
> http://kuantkid.github.com/
>
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_sfd2d_oct
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
Hello there.
This module uses the standard python library `warnings`. The exact code for
this function, for instance is:
> def warn_if_not_float(X, estimator='This algorithm'):
> """Warning utility function to check that data type is floating
> point"""
> if not isinstance(estimator, basestring):
> estimator = estimator.__class__.__name__
> if X.dtype.kind != 'f':
> warnings.warn("%s assumes floating point values as input, "
> "got %s" % (estimator, X.dtype))
The rules for this module are (somewhat poorly) explained here:
http://docs.python.org/library/warnings.html
Anyway, to get all warnings, put this at the top of your module (or enter
at the start of IPython):
> import warnings
> warnings.filterwarnings(action='always')
Hope that helps,
Robert
--
Public key at: http://pgp.mit.edu/ Search for this email address and select
the key from "2011-08-19" (key id: 54BA8735)
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general