epfl.classifier
Class MixtureModelClassifier.ClassModel

java.lang.Object
  |
  +--epfl.classifier.MixtureModelClassifier.ClassModel
Enclosing class:
MixtureModelClassifier

public static class MixtureModelClassifier.ClassModel
extends java.lang.Object


Field Summary
 double priorProb
          The class prior probability (weight)
 double recognition
          The recognition precision [0.0, 1.0] When evaluating the class pdf, takes only the first n most important features.
 
Constructor Summary
MixtureModelClassifier.ClassModel(double priorProb, int nFeatures, int nKernels, double[][] mu, double[] sigma, double[][] missingVal, double recognition, java.lang.String name)
          Creates a new class model
MixtureModelClassifier.ClassModel(TagReader config, java.lang.String name)
          Creates a new Class model with parameters read in a file
 
Method Summary
 NormalKernelPdf getFeaturePdf(int index)
          Returns the pdf associated to the given feature index 0..nFeatures-1
 int nFeatures()
          Returns the number of features (input vector size)
 double pdf(double[] features)
          The class pdf
 void tagWrite(TagWriter out)
           
 void tagWrite(TagWriter out, TagWriter.Indent _indent)
          Writes a tag representation for this class model in a tag writer
 java.lang.String toString()
          Returns a string representation for this class model
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

priorProb

public double priorProb
The class prior probability (weight)

recognition

public double recognition
The recognition precision [0.0, 1.0] When evaluating the class pdf, takes only the first n most important features. Where n = recognition*nFeatures.
Constructor Detail

MixtureModelClassifier.ClassModel

public MixtureModelClassifier.ClassModel(double priorProb,
                                         int nFeatures,
                                         int nKernels,
                                         double[][] mu,
                                         double[] sigma,
                                         double[][] missingVal,
                                         double recognition,
                                         java.lang.String name)
Creates a new class model
Parameters:
priorProb - the prior class probability
nFeatures - the number of feature for the class (input vector size)
nKernels - the initial number of kernels for each feature
mu - mu[f][0] = min Mu; mu[f][1] = max Mu for the feature f kernels
f in range 0..nFeatures-1
sigma - sigma[f] the sigma value for the feature f kernels
f in range 0..nFeatures-1
missingVal - missingValue[f][0] = missing value code; missingValue[f][1] = missing value substitute;
f in range 0..nFeatures;
recognition - the recognition precision in range 0..1
name - the class model's name

MixtureModelClassifier.ClassModel

public MixtureModelClassifier.ClassModel(TagReader config,
                                         java.lang.String name)
                                  throws java.io.IOException
Creates a new Class model with parameters read in a file
Parameters:
config - the configuration file
name - the tag name enclosing the parameters
The file format must be :
<name>
  <priorProb> double </priorProb>
  <recognition> double </recognition>
  <nFeatures>int </nFeatures>
  { <featurei>
    NormalKernelPdf
  </featurei> } i in range 0..nFeatures-1
</name>
Throws:
java.io.IOException - if there is an error in file format
Method Detail

getFeaturePdf

public NormalKernelPdf getFeaturePdf(int index)
Returns the pdf associated to the given feature index 0..nFeatures-1

nFeatures

public int nFeatures()
Returns the number of features (input vector size)

pdf

public double pdf(double[] features)
The class pdf

toString

public java.lang.String toString()
Returns a string representation for this class model
Overrides:
toString in class java.lang.Object

tagWrite

public void tagWrite(TagWriter out,
                     TagWriter.Indent _indent)
Writes a tag representation for this class model in a tag writer

tagWrite

public void tagWrite(TagWriter out)