comirva.audio.feature
Class MandelEllis

java.lang.Object
  extended by comirva.audio.feature.Attribute
      extended by comirva.audio.feature.AudioFeature
          extended by comirva.audio.feature.MandelEllis
All Implemented Interfaces:
XMLSerializable, Serializable

public class MandelEllis
extends AudioFeature
implements XMLSerializable, Serializable

See Also:
Serialized Form

Field Summary
protected  Matrix covarMatrix
           
protected  Matrix covarMatrixInv
          the inverted covarMatrix, stored for computational efficiency
protected  Matrix mean
          a row vector
 
Constructor Summary
protected MandelEllis()
           
  MandelEllis(Matrix covarMatrix, Matrix mean)
          "Gaussian Mixture Model for Mandel / Ellis algorithm" This class holds the features needed for the Mandel Ellis algorithm: One full covariance matrix, and the mean of all MFCCS.
 
Method Summary
 double[] getAsArray()
          Returns the fluctuation pattern matrix as a double array.
 double getDistance(AudioFeature f)
          Measures the similarity/dissimilarity of two audio streams characterized by two audio features.
 void readXML(XMLStreamReader parser)
          Reads the xml representation of an object form the xml input stream.
 void writeXML(XMLStreamWriter writer)
          Writes the xml representation of this object to the xml output stream.
 
Methods inherited from class comirva.audio.feature.Attribute
getClassName, getType, readAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

covarMatrix

protected Matrix covarMatrix

covarMatrixInv

protected Matrix covarMatrixInv
the inverted covarMatrix, stored for computational efficiency


mean

protected Matrix mean
a row vector

Constructor Detail

MandelEllis

public MandelEllis(Matrix covarMatrix,
                   Matrix mean)
"Gaussian Mixture Model for Mandel / Ellis algorithm" This class holds the features needed for the Mandel Ellis algorithm: One full covariance matrix, and the mean of all MFCCS.


MandelEllis

protected MandelEllis()
Method Detail

getAsArray

public double[] getAsArray()
Returns the fluctuation pattern matrix as a double array.

Specified by:
getAsArray in class AudioFeature
Returns:
double[] the fluctuation pattern matrix, row packed

getDistance

public double getDistance(AudioFeature f)
Description copied from class: AudioFeature
Measures the similarity/dissimilarity of two audio streams characterized by two audio features.

Specified by:
getDistance in class AudioFeature
Parameters:
f - AudioFeature another audio feature of the same type
Returns:
double the distance between the two audio streams

writeXML

public void writeXML(XMLStreamWriter writer)
              throws IOException,
                     XMLStreamException
Writes the xml representation of this object to the xml output stream.

There is the convention, that each call to a writeXML() method results in one xml element in the output stream.

Specified by:
writeXML in interface XMLSerializable
Parameters:
writer - XMLStreamWriter the xml output stream
Throws:
IOException - raised, if there are any io troubles
XMLStreamException - raised, if there are any parsing errors

readXML

public void readXML(XMLStreamReader parser)
             throws IOException,
                    XMLStreamException
Reads the xml representation of an object form the xml input stream.

There is the convention, that readXML() starts parsing by checking the start tag of this object and finishes parsing by checking the end tag. The caller has to ensure, that at method entry the current token is the start tag. After the method call it's the callers responsibility to move from the end tag to the next token.

Specified by:
readXML in interface XMLSerializable
Parameters:
parser - XMLStreamReader the xml input stream
Throws:
IOException - raised, if there are any io troubles
XMLStreamException - raised, if there are any parsing errors