|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object comirva.audio.feature.Attribute comirva.audio.feature.AudioFeature comirva.audio.feature.TimbreDistribution
public class TimbreDistribution
Timbre Distribution
Description:
Represents a similarity measure based on the song's timbre. The distribution of the MFCCs of a song is used to summarize the song. Songs having similar distributions are consider similar.
TimbreDistributionExtractor
,
Serialized FormConstructor Summary | |
---|---|
protected |
TimbreDistribution()
Used for xml serialization only. |
|
TimbreDistribution(GaussianMixture gmm)
Constructs a TimbreDistribution feature. |
Method Summary | |
---|---|
double[] |
getAsArray()
Returns a vector representation of each feature. |
double |
getDistance(AudioFeature f)
Computes the distance between two timbre distributions representing two songs. |
GaussianMixture |
getGaussianMixtureModel()
For testing purpose only. |
double |
getLogLikelihood()
Returns the log likelihood for the own samples points, which have been drawn from the gmm representing the song. |
double |
getLogLikelihood(PointList samplePoints)
Returns the log likelihood for a given sample set. |
PointList |
getSamplePoints()
Returns a list of samples drawn from the gmm representing this song. |
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 ouput 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 |
Constructor Detail |
---|
public TimbreDistribution(GaussianMixture gmm)
TimbreDistribution
feature.
gmm
- GaussianMixture the gmm summarizing the songprotected TimbreDistribution()
Method Detail |
---|
public double getLogLikelihood(PointList samplePoints)
samplePoints
- PointList sample set
public double getLogLikelihood()
public double[] getAsArray()
getAsArray
in class AudioFeature
public PointList getSamplePoints()
public double getDistance(AudioFeature f) throws ClassCastException
getDistance
in class AudioFeature
f
- AudioFeature another timbre distribution feature
ClassCastException
- thrown if the passed AudioFeature is
not an object of type
TimbreDistribution
public GaussianMixture getGaussianMixtureModel()
public void writeXML(XMLStreamWriter writer) throws IOException, XMLStreamException
writeXML()
method
results in one xml element in the output stream.
writeXML
in interface XMLSerializable
writer
- XMLStreamWriter the xml output stream
IOException
- raised, if there are any io troubles
XMLStreamException
- raised, if there are any parsing errorspublic void readXML(XMLStreamReader parser) throws IOException, XMLStreamException
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.
readXML
in interface XMLSerializable
parser
- XMLStreamReader the xml input stream
IOException
- raised, if there are any io troubles
XMLStreamException
- raised, if there are any parsing errors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |