milk.classifiers
Class MIRBFNetwork

java.lang.Object
  |
  +--milk.classifiers.MIClassifier
        |
        +--milk.classifiers.MIRBFNetwork
All Implemented Interfaces:
java.lang.Cloneable, weka.core.OptionHandler, java.io.Serializable

public class MIRBFNetwork
extends MIClassifier
implements weka.core.OptionHandler

Multi-instance RBF network. Uses k-means with distributions fit in post-processing step plus MILR at the second level.

See Also:
Serialized Form

Field Summary
protected  weka.filters.unsupervised.attribute.ClusterMembership m_clm
          The RBF filter
protected  MIClassifier m_logistic
          The logistic regression model
protected  int m_num_clusters
          The number of clusters to use
protected  double m_ridge
          The ridge regression coefficient for logistic regression
 
Constructor Summary
MIRBFNetwork()
           
 
Method Summary
 void buildClassifier(Exemplars train)
          Builds the classifier.
 double[] distributionForExemplar(Exemplar exmp)
          Computes the distribution for a given exemplar
 int getNumClusters()
          Get the Num_clusters value.
 java.lang.String[] getOptions()
          Gets the current settings of the classifier.
 double getRidge()
          Get the Ridge value.
 java.util.Enumeration listOptions()
          Returns an enumeration describing the available options
static void main(java.lang.String[] argv)
          Main method for testing this class.
 void setNumClusters(int newNum_clusters)
          Set the Num_clusters value.
 void setOptions(java.lang.String[] options)
          Parses a given list of options.
 void setRidge(double newRidge)
          Set the Ridge value.
 java.lang.String toString()
          Gets a string describing the classifier.
 Exemplar transform(Exemplar test)
           
 Exemplars transform(Exemplars ex)
           
 
Methods inherited from class milk.classifiers.MIClassifier
classifyExemplar, forName, makeCopies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_logistic

protected MIClassifier m_logistic
The logistic regression model


m_clm

protected weka.filters.unsupervised.attribute.ClusterMembership m_clm
The RBF filter


m_num_clusters

protected int m_num_clusters
The number of clusters to use


m_ridge

protected double m_ridge
The ridge regression coefficient for logistic regression

Constructor Detail

MIRBFNetwork

public MIRBFNetwork()
Method Detail

getNumClusters

public int getNumClusters()
Get the Num_clusters value.

Returns:
the Num_clusters value.

setNumClusters

public void setNumClusters(int newNum_clusters)
Set the Num_clusters value.

Parameters:
newNum_clusters - The new Num_clusters value.

getRidge

public double getRidge()
Get the Ridge value.

Returns:
the Ridge value.

setRidge

public void setRidge(double newRidge)
Set the Ridge value.

Parameters:
newRidge - The new Ridge value.

listOptions

public java.util.Enumeration listOptions()
Returns an enumeration describing the available options

Specified by:
listOptions in interface weka.core.OptionHandler
Returns:
an enumeration of all the available options

setOptions

public void setOptions(java.lang.String[] options)
                throws java.lang.Exception
Parses a given list of options. Valid options are:

-N number
The number of clusters to use.

-R ridge
Set the ridge parameter for the log-likelihood.

Specified by:
setOptions in interface weka.core.OptionHandler
Parameters:
options - the list of options as an array of strings
Throws:
java.lang.Exception - if an option is not supported

getOptions

public java.lang.String[] getOptions()
Gets the current settings of the classifier.

Specified by:
getOptions in interface weka.core.OptionHandler
Returns:
an array of strings suitable for passing to setOptions

transform

public Exemplars transform(Exemplars ex)
                    throws java.lang.Exception
java.lang.Exception

transform

public Exemplar transform(Exemplar test)
                   throws java.lang.Exception
java.lang.Exception

buildClassifier

public void buildClassifier(Exemplars train)
                     throws java.lang.Exception
Builds the classifier.

Specified by:
buildClassifier in class MIClassifier
Parameters:
train - the training data to be used for generating the boosted classifier.
Throws:
java.lang.Exception - if the classifier could not be built successfully

distributionForExemplar

public double[] distributionForExemplar(Exemplar exmp)
                                 throws java.lang.Exception
Computes the distribution for a given exemplar

Overrides:
distributionForExemplar in class MIClassifier
Parameters:
exmp - the exemplar for which distribution is computed
Returns:
the distribution
Throws:
java.lang.Exception - if the distribution can't be computed successfully

toString

public java.lang.String toString()
Gets a string describing the classifier.

Overrides:
toString in class java.lang.Object
Returns:
a string describing the classifer built.

main

public static void main(java.lang.String[] argv)
Main method for testing this class.

Parameters:
argv - should contain the command line arguments to the scheme (see Evaluation)