I vote for 3.
On Fri, May 1, 2015 at 6:27 PM, Andreas Mueller <t3k...@gmail.com> wrote:
> Hi all.
> A quick questions on future API.
> What should happen if a user passes an X with shape (N,), in other words
> X.ndim == 1?
>
> This is unfortunately not really consistent in scikit-learn right now.
> Three things are possible:
> 1) Raise an error
> 2) N = n_features, that is X contains a single sample
> 3) N = n_samples, that is X has a single feature
>
> I would think it should be N=n_samples. Gael thinks (iirc) we should raise
> an error.
> In the code, we currently take N=n_features in predict, decision_function,
> predict_proba and transform, basically everywhere.
> This is in part due to using ``check_array`` everywhere, which used the
> backward-compatible (but odd) behavior of np.atleast2d.
>
> In ``fit``it looks like all estimators assume N=n_features, apart from
> DictionaryLearning, MinMaxScaler, StandardScaler, which assume
> N=n_samples.
>
> See https://github.com/scikit-learn/scikit-learn/pull/4511 for more
> discussion
>
> Obviously any change we make would mean a deprecation cycle, which will
> mean warning in 0.17 and 0.18 when someone gives a 1-dim X that we'll
> change something soon, and then actually change it in 0.19 (1.0?).
>
> Andy
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general