weka.classifiers.bayes.blr
Class LaplacePriorImpl

java.lang.Object
  extended by weka.classifiers.bayes.blr.Prior
      extended by weka.classifiers.bayes.blr.LaplacePriorImpl
All Implemented Interfaces:
java.io.Serializable, RevisionHandler

public class LaplacePriorImpl
extends Prior

Implementation of the Gaussian Prior update function based on modified CLG Algorithm (CLG-Lasso) with a certain Trust Region Update based on Laplace Priors.

Version:
$Revision: 1.2 $
Author:
Navendu Garg(gargnav@iit.edu)
See Also:
Serialized Form

Constructor Summary
LaplacePriorImpl()
           
 
Method Summary
 void computeLogLikelihood(double[] betas, Instances instances)
          Computes the log-likelihood values using the implementation in the Prior class.
 void computePenalty(double[] betas, double[] hyperparameters)
          This function computes the penalty term specific to Laplacian distribution.
 java.lang.String getRevision()
          Returns the revision string.
 double laplaceUpdate(int j, double sign)
          This is the CLG-lasso update function described in the
 double update(int j, Instances instances, double beta, double hyperparameter, double[] r, double deltaV)
          Update function specific to Laplace Prior.
 
Methods inherited from class weka.classifiers.bayes.blr.Prior
computelogLikelihood, getLoglikelihood, getLogPosterior, getPenalty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LaplacePriorImpl

public LaplacePriorImpl()
Method Detail

update

public double update(int j,
                     Instances instances,
                     double beta,
                     double hyperparameter,
                     double[] r,
                     double deltaV)
Update function specific to Laplace Prior.

Overrides:
update in class Prior

laplaceUpdate

public double laplaceUpdate(int j,
                            double sign)
This is the CLG-lasso update function described in the
 @TechReport{blrtext04,
author = {Alexander Genkin and David D. Lewis and David Madigan},
title = {Large-scale bayesian logistic regression for text categorization},
institution = {DIMACS},
year = {2004},
url = "http://www.stat.rutgers.edu/~madigan/PAPERS/shortFat-v3a.pdf",
OPTannote = {}
}

Parameters:
j -
Returns:
double value

computeLogLikelihood

public void computeLogLikelihood(double[] betas,
                                 Instances instances)
Computes the log-likelihood values using the implementation in the Prior class.

Parameters:
betas -
instances -
hyperparameter -

computePenalty

public void computePenalty(double[] betas,
                           double[] hyperparameters)
This function computes the penalty term specific to Laplacian distribution.

Overrides:
computePenalty in class Prior
Parameters:
betas -
hyperparameters -

getRevision

public java.lang.String getRevision()
Returns the revision string.

Returns:
the revision