Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.classifiers.bayes.blr
Class Prior

    java.lang.Object
      weka.classifiers.bayes.blr.Prior

All Implemented Interfaces:
  java.io.Serializable, RevisionHandler

Direct Known Subclasses:
  GaussianPriorImpl, LaplacePriorImpl

    public abstract class Prior

extends java.lang.Object
implements java.io.Serializable, RevisionHandler

This is an interface to plug various priors into the Bayesian Logistic Regression Model.

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

Constructor Summary
`Prior()`

Method Summary
`void` | `computelogLikelihood(double[] betas, Instances instances)` Function computes the log-likelihood value: -sum{1 to n}{ln(1+exp(-Beta*x(i)*y(i))}
`void` | `computePenalty(double[] betas, double[] hyperparameters)` Skeleton function to compute penalty terms.
`double` | `getLoglikelihood()`
`double` | `getLogPosterior()`
`double` | `getPenalty()`
`double` | `update(int j, Instances instances, double beta, double hyperparameter, double[] r, double deltaV)` Interface for the update functions for different types of priors.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface weka.core.RevisionHandler
`getRevision`

Constructor Detail

### Prior

    public Prior()

Method Detail

### update

    public double update(int j,
                         Instances instances,
                         double beta,
                         double hyperparameter,
                         double[] r,
                         double deltaV)

  Interface for the update functions for different types of priors.

### computelogLikelihood

    public void computelogLikelihood(double[] betas,
                                     Instances instances)

  Function computes the log-likelihood value: -sum{1 to n}{ln(1+exp(-Beta*x(i)*y(i))}

  Parameters:
    `betas` -
    `instances` -

### computePenalty

    public void computePenalty(double[] betas,
                               double[] hyperparameters)

  Skeleton function to compute penalty terms.

  Parameters:
    `betas` -
    `hyperparameters` -

### getLoglikelihood

    public double getLoglikelihood()

  Returns:
    log-likelihood value.

### getLogPosterior

    public double getLogPosterior()

  Returns:
    regularized log posterior value.

### getPenalty

    public double getPenalty()

  Returns:
    penalty term.

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD