Github user mktal commented on a diff in the pull request:
https://github.com/apache/incubator-madlib/pull/1#discussion_r44073252
--- Diff: src/modules/convex/linear_svm_igd.cpp ---
@@ -95,19 +90,16 @@ linear_svm_igd_transition::run(AnyType &args) {
using madlib::dbal::eigen_integration::MappedColumnVector;
GLMTuple tuple;
tuple.indVar.rebind(args[1].getAs<MappedColumnVector>().memoryHandle(),
- state.task.dimension);
- tuple.depVar = args[2].getAs<bool>() ? 1. : -1.;
+ state.task.dimension);
+ tuple.depVar = args[2].getAs<double>();
// Now do the transition step
// apply IGD with regularization
- if (isL2) {
- L2<GLMModel>::scaling(state.algo.incrModel, lambda, nTuples,
state.task.stepsize);
- LinearSVMIGDAlgorithm::transition(state, tuple);
- } else {
- LinearSVMIGDAlgorithm::transition(state, tuple);
- L1<GLMModel>::clipping(state.algo.incrModel, lambda, nTuples,
state.task.stepsize);
- }
- // objective function and its gradient
+ L2<GLMModel>::scaling(state.task.model, state.algo.incrModel,
state.task.stepsize);
--- End diff --
The L2 and L1 regularization are not exclusive. We can perform both of them
by setting the corresponding regularization parameters to non-zero.
---
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.
---