GitHub user iyerr3 opened a pull request:
https://github.com/apache/incubator-madlib/pull/43
SVM: Add class weights for use with unbalanced data
JIRA: MADLIB-998
Added 'class_weight' in the 'params' argument. It can either be a string or
a
dictionary-like mapping. In case of a string, we currently only accept
'balanced' as an option. For a mapping, the user can map values of the
dependent variable to specific double precision weights. Since, SVM only
supports binary classification at present, the class_weight mapping can only
take upto two arguments.
As part of this work, we add a 'tuple_weight' argument to the SVM aggregate.
This allows future addition of sample weights (which would be multiplied
with
the class weight).
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/iyerr3/incubator-madlib
feature/svm_class_weights
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-madlib/pull/43.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #43
----
commit 545bf14c46d1ae5e75088e83abed1c26a841d4f7
Author: Rahul Iyer <[email protected]>
Date: 2016-05-20T23:28:23Z
SVM: Add class weights for use with unbalanced data
JIRA: MADLIB-998
Added 'class_weight' in the 'params' argument. It can either be a string or
a
dictionary-like mapping. In case of a string, we currently only accept
'balanced' as an option. For a mapping, the user can map values of the
dependent variable to specific double precision weights. Since, SVM only
supports binary classification at present, the class_weight mapping can only
take upto two arguments.
As part of this work, we add a 'tuple_weight' argument to the SVM aggregate.
This allows future addition of sample weights (which would be multiplied
with
the class weight).
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---