On 01/23/2012 07:01 PM, Dimitrios Pritsos wrote:
> On 01/23/2012 06:59 PM, Andreas wrote:
>> On 01/23/2012 05:54 PM, Dimitrios Pritsos wrote:
>>> Relate to LinearSVC() and SGDClassifier()
>>>
>>> I ran both with a subset of my 33k-samples by 30k-features and I am
>>> getting a huge difference in results. Is this expected behavour!
>>>
>>> After 10-fold-cross-validation (using the Defaults as arguments in both
>>> cases) I am getting:
>>>
>>> Accuracy = 44% for SGD
>>> Accuracy = 89% for LinearSVC
>>>
>>>
>>> This is the modules I called
>>> csvm = svm.LinearSVC()
>>> csvm.fit(X, y)
>>> csvm.score(crossv_X, crossv_y)
>>>
>>> sgd = linear_model.SGDClassifier()
>>> sgd.fit(X, y)
>>> sgd.score(crossv_X, crossv_y)
>>>
>>>
>>>
>> This is somewhat expected since SGD has some tuning parameters.
>> For example the number of iterations is set to 5 by default afaik.
>> Having this higher would probably give you better results.
>> Also the parameter alpha should probably be cross-validated, as SGD
>> is more sensitive to this then LinearSVC is to the C parameter.
>>
> THANX! I will play a bit with these params and I will give a feedback in
> case I will have same results to LinearSVC.

Yes Actually I got 78% with SGD and 40 iteration VS. 87% with LinearSVC

However, when I do the same test using partial_fit() for the same 
sub-set of my Data Set (see above) I am getting ~20%.

Any Suggestions?

>> ------------------------------------------------------------------------------
>> Try before you buy = See our experts in action!
>> The most comprehensive online learning library for Microsoft developers
>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>> Metro Style Apps, more. Free future releases when you subscribe now!
>> http://p.sf.net/sfu/learndevnow-dev2
>> _______________________________________________
>> Scikit-learn-general mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to