2012/7/11 Philipp Singer <[email protected]>: > Am 11.07.2012 10:02, schrieb Olivier Grisel: >> 2012/7/11 Philipp Singer<[email protected]>: >>> Am 10.07.2012 22:57, schrieb Andreas Mueller: >>> >>>> You can use SVC with kernel="linear". That shouldn't be much slower than >>>> LinearSVC. >>>> >>> >>> Thanks for the hint. Unfortunately, the LinearSVC implementation is much >>> faster than the SVC implementation with a linear kernel. >> >> It mostly depends on the number of samples and classes. For low number >> of classes and medium number of samples (e.g. couple of thousands), >> SVC on dense data can be much faster (and more memory efficient too). >> >> > > I see! The thing is that I do text classification (so I have a huge > amount of features) and I also have a large number of training examples, > which seems to slow down the SVC implementation. On the other hand, the > LinearSVC implementation works pretty fast. > > I guess, it should not be a hard task to implement sample weighting for > LinearSVC as well? I will take a look into it.
LinearSVC is based on the liblinear C++ library which AFAIK does not support sample weight. You should better have a look at SGDClassifier: http://scikit-learn.org/stable/modules/sgd.html -- Olivier http://twitter.com/ogrisel - http://github.com/ogrisel ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
