scikit-learn/scikit-learn — pull request #2784 by HapeMask (2014-01-21 17:01:50+00:00)
Title: Liblinear Sample Weights

As discussed in #409, I have patched the included liblinear sources with the update to scale C for each sample individually.

I mostly just copied the libsvm python wrapper to expose the new parameter. The existing tests didn't fully cover the LinearSVC+sample_weights case, so I modified them.

I'm admittedly not familiar with the libsvm internals, but the patching was straightforward and preserved the existing sklearn modifications. The previous tests still pass as well.