Class CTTemplateClassifier
java.lang.Object
clickTrainDetector.classification.templateClassifier.CTTemplateClassifier
- All Implemented Interfaces:
CTClassifier
A template classifier which uses a click template to essentially cross correlate
the spectrums.
- Author:
- Jamie Macaulay
-
Field Summary
Fields inherited from interface clickTrainDetector.classification.CTClassifier
NOSPECIES, PRECLASSIFIERFLAG -
Constructor Summary
ConstructorsConstructorDescriptionCTTemplateClassifier(int defaultSpeciesID) CTTemplateClassifier(ClickTrainControl clickTrainControl, int defaultSpeciesID) -
Method Summary
Modifier and TypeMethodDescriptionprotected doublecalcSpectrumCorrelation(double[] averageSpectra, float sR) Calculate the correlation value for the average waveform and spectrum template.protected doublecalcSpectrumCorrelation(AverageWaveform averageWaveform) Calculate the correlation value for the average waveform and spectrum template.classifyClickTrain(CTDataUnit clickTrain) Classify a click train detection.getName()Get the name of the classifier.Get the simple classifier parameters.intGet the unique species ID for the classifier.static voidvoidsetParams(CTClassifierParams ctClassifierParams) Set the classifier parameters.
-
Constructor Details
-
CTTemplateClassifier
-
CTTemplateClassifier
public CTTemplateClassifier(int defaultSpeciesID)
-
-
Method Details
-
classifyClickTrain
Description copied from interface:CTClassifierClassify a click train detection.- Specified by:
classifyClickTrainin interfaceCTClassifier- Returns:
- the classified data block.
-
calcSpectrumCorrelation
Calculate the correlation value for the average waveform and spectrum template.- Parameters:
averageWaveform- - the average waveform.- Returns:
- the correlation value.
-
calcSpectrumCorrelation
protected double calcSpectrumCorrelation(double[] averageSpectra, float sR) Calculate the correlation value for the average waveform and spectrum template.- Parameters:
sR- - the samplerate of the average spectra in samples per second.averageWaveform- - the average spectrum in even frequency bins.- Returns:
- the correlation value.
-
getName
Description copied from interface:CTClassifierGet the name of the classifier.- Specified by:
getNamein interfaceCTClassifier- Returns:
- the name of the classifier
-
getCTClassifierGraphics
- Specified by:
getCTClassifierGraphicsin interfaceCTClassifier
-
getParams
Get the simple classifier parameters.- Specified by:
getParamsin interfaceCTClassifier- Returns:
- the classifier parameters.
-
setParams
Description copied from interface:CTClassifierSet the classifier parameters.- Specified by:
setParamsin interfaceCTClassifier- Parameters:
ctClassifierParams- - the ct classifier paratmers
-
getSpeciesID
public int getSpeciesID()Description copied from interface:CTClassifierGet the unique species ID for the classifier.- Specified by:
getSpeciesIDin interfaceCTClassifier- Returns:
- the name of the classifier
-
main
-