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 double
calcSpectrumCorrelation
(double[] averageSpectra, float sR) Calculate the correlation value for the average waveform and spectrum template.protected double
calcSpectrumCorrelation
(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.int
Get the unique species ID for the classifier.static void
void
setParams
(CTClassifierParams ctClassifierParams) Set the classifier parameters.
-
Constructor Details
-
CTTemplateClassifier
-
CTTemplateClassifier
public CTTemplateClassifier(int defaultSpeciesID)
-
-
Method Details
-
classifyClickTrain
Description copied from interface:CTClassifier
Classify a click train detection.- Specified by:
classifyClickTrain
in 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:CTClassifier
Get the name of the classifier.- Specified by:
getName
in interfaceCTClassifier
- Returns:
- the name of the classifier
-
getCTClassifierGraphics
- Specified by:
getCTClassifierGraphics
in interfaceCTClassifier
-
getParams
Get the simple classifier parameters.- Specified by:
getParams
in interfaceCTClassifier
- Returns:
- the classifier parameters.
-
setParams
Description copied from interface:CTClassifier
Set the classifier parameters.- Specified by:
setParams
in interfaceCTClassifier
- Parameters:
ctClassifierParams
- - the ct classifier paratmers
-
getSpeciesID
public int getSpeciesID()Description copied from interface:CTClassifier
Get the unique species ID for the classifier.- Specified by:
getSpeciesID
in interfaceCTClassifier
- Returns:
- the name of the classifier
-
main
-