Hi Alex,
I would say:
if it makes sense to fit a GP with only one point:
it should be fixed
else:
raise a nicer error message
Alex
On Tue, Nov 29, 2011 at 7:10 PM, Alexandre Passos
<[email protected]> wrote:
> Hi,
>
> Currently the fit function in GaussianProcess throws a weird exception
> when only one training example is passed to fit():
>
>>>> from sklearn.gaussian_process import GaussianProcess
> from sklearn.gaussian_process import GaussianProcess
>>>> gp.fit([[1., 2.]], [-1.0])
> gp.fit([[1., 2.]], [-1.0])
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File
> "/Users/apassos/Library/Python/2.7/lib/python/site-packages/sklearn/gaussian_process/gaussian_process.py",
> line 281, in fit
> if np.min(np.sum(D, axis=1)) == 0. \
> File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/fromnumeric.py",
> line 1862, in amin
> return amin(axis, out)
> ValueError: zero-size array to ufunc.reduce without identity
>>>>
>
> Should this be fixed or should a better error message be passed?
> --
> - Alexandre
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general