jml.regression
Class LASSO

java.lang.Object
  extended by jml.regression.Regression
      extended by jml.regression.LASSO

public class LASSO
extends Regression

A Java implementation of LASSO, which solves the following convex optimization problem:

min_W 2\1 || Y - X * W ||_F^2 + lambda * || W ||_1
where X is an n-by-p data matrix with each row bing a p dimensional data vector and Y is an n-by-ny dependent variable matrix.

Version:
1.0 Jan. 14th, 2013
Author:
Mingjie Qian

Field Summary
private  boolean calc_OV
          If compute objective function values during the iterations or not.
private  double lambda
          Regularization parameter.
private  boolean verbose
          If show computation detail during iterations or not.
 
Fields inherited from class jml.regression.Regression
epsilon, maxIter, n, ny, p, W, X, Y
 
Constructor Summary
LASSO()
           
LASSO(double epsilon)
           
LASSO(double lambda, int maxIter, double epsilon)
           
LASSO(int maxIter, double epsilon)
           
LASSO(Options options)
           
 
Method Summary
 void loadModel(java.lang.String filePath)
           
static void main(java.lang.String[] args)
           
 void saveModel(java.lang.String filePath)
           
 void train()
          Train the regression model.
 org.apache.commons.math.linear.RealMatrix train(org.apache.commons.math.linear.RealMatrix X, org.apache.commons.math.linear.RealMatrix Y)
           
static org.apache.commons.math.linear.RealMatrix train(org.apache.commons.math.linear.RealMatrix X, org.apache.commons.math.linear.RealMatrix Y, Options options)
           
 
Methods inherited from class jml.regression.Regression
feedData, feedData, feedDependentVariables, feedDependentVariables, predict, predict
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lambda

private double lambda
Regularization parameter.


calc_OV

private boolean calc_OV
If compute objective function values during the iterations or not.


verbose

private boolean verbose
If show computation detail during iterations or not.

Constructor Detail

LASSO

public LASSO()

LASSO

public LASSO(double epsilon)

LASSO

public LASSO(int maxIter,
             double epsilon)

LASSO

public LASSO(double lambda,
             int maxIter,
             double epsilon)

LASSO

public LASSO(Options options)
Method Detail

main

public static void main(java.lang.String[] args)
Parameters:
args -

train

public void train()
Description copied from class: Regression
Train the regression model.

Specified by:
train in class Regression

loadModel

public void loadModel(java.lang.String filePath)
Specified by:
loadModel in class Regression

saveModel

public void saveModel(java.lang.String filePath)
Specified by:
saveModel in class Regression

train

public static org.apache.commons.math.linear.RealMatrix train(org.apache.commons.math.linear.RealMatrix X,
                                                              org.apache.commons.math.linear.RealMatrix Y,
                                                              Options options)

train

public org.apache.commons.math.linear.RealMatrix train(org.apache.commons.math.linear.RealMatrix X,
                                                       org.apache.commons.math.linear.RealMatrix Y)
Specified by:
train in class Regression