I don't know whether such a test is relevant. But if it were relevant, it
should be done, so I thought it worth suggesting.


On Thu, Apr 18, 2013 at 5:03 PM, Qiang Luo <notifications@github.com> wrote:

> In sklearn/svm/tests/test_svm.py:
>
> > @@ -175,6 +175,21 @@ def test_svr():
> >          clf.fit(diabetes.data, diabetes.target)
> >          assert_greater(clf.score(diabetes.data, diabetes.target), 0.02)
> >
> > +
> > +def test_liblinear_svr():
> > +    """
> > +    Test Liblinear SVR
> > +    """
> > +
> > +    diabetes = datasets.load_diabetes()
> > +    for clf in (svm.LinearSVR(C=1.0,epsilon=0.1),
> > +                svm.LinearSVR(C=10.,epsilon=0.1),
> > +                svm.LinearSVR(loss="l1",C=10.,epsilon=0.1),
> > +                svm.LinearSVR(loss="l1",C=100.,epsilon=0.1),
>
> I am not quite sure what to test here. I just tweaked the test for SVR.
> The results of SVR with linear kernel and LinearSVR are different. There is
> randomness in liblinear solution. I guess SVR is deterministic. I have
> checked that the results are the same with original liblinear for some
> examples. Maybe I should check this in test.
> … <#13e1bf45e4a348b2_>
> On 04/18/2013 02:28 PM, jnothman wrote: In sklearn/svm/tests/test_svm.py:
> > @@ -175,6 +175,21 @@ def test_svr(): > clf.fit(diabetes.data,
> diabetes.target) > assert_greater(clf.score(diabetes.data,
> diabetes.target), 0.02) > > + > +def test_liblinear_svr(): > + """ > + Test
> Liblinear SVR > + """ > + > + diabetes = datasets.load_diabetes() > + for
> clf in (svm.LinearSVR(C=1.0,epsilon=0.1), > +
> svm.LinearSVR(C=10.,epsilon=0.1), > +
> svm.LinearSVR(loss="l1",C=10.,epsilon=0.1), > +
> svm.LinearSVR(loss="l1",C=100.,epsilon=0.1), Is it worth having a test to
> ensure epsilon is transmitted to |liblinear| by varying it? Also, is it
> appropriate to check where appropriate that the solutions/parameters found
> are close to those produced by |SVR| with a linear kernel? (or is that not
> guaranteed? or is that liblinear's problem, not ours?) (There should also
> be spaces after commas here.) — Reply to this email directly or view it on
> GitHub <
> https://github.com/scikit-learn/scikit-learn/pull/1867/files#r3847554>.
>  -- Qiang Luo Department of Mathematical Sciences Tsinghua University
> Beijing 100084 China
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/scikit-learn/scikit-learn/pull/1867/files#r3847883>
> .
>