Class CTTemplateClassifier

java.lang.Object
clickTrainDetector.classification.templateClassifier.CTTemplateClassifier
All Implemented Interfaces:
CTClassifier

public class CTTemplateClassifier extends Object implements CTClassifier
A template classifier which uses a click template to essentially cross correlate the spectrums.
Author:
Jamie Macaulay
  • Constructor Details

    • CTTemplateClassifier

      public CTTemplateClassifier(ClickTrainControl clickTrainControl, int defaultSpeciesID)
    • CTTemplateClassifier

      public CTTemplateClassifier(int defaultSpeciesID)
  • Method Details

    • classifyClickTrain

      public CTClassification classifyClickTrain(CTDataUnit clickTrain)
      Description copied from interface: CTClassifier
      Classify a click train detection.
      Specified by:
      classifyClickTrain in interface CTClassifier
      Returns:
      the classified data block.
    • calcSpectrumCorrelation

      protected double calcSpectrumCorrelation(AverageWaveform averageWaveform)
      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

      public String getName()
      Description copied from interface: CTClassifier
      Get the name of the classifier.
      Specified by:
      getName in interface CTClassifier
      Returns:
      the name of the classifier
    • getCTClassifierGraphics

      public CTClassifierGraphics getCTClassifierGraphics()
      Specified by:
      getCTClassifierGraphics in interface CTClassifier
    • getParams

      public TemplateClassifierParams getParams()
      Get the simple classifier parameters.
      Specified by:
      getParams in interface CTClassifier
      Returns:
      the classifier parameters.
    • setParams

      public void setParams(CTClassifierParams ctClassifierParams)
      Description copied from interface: CTClassifier
      Set the classifier parameters.
      Specified by:
      setParams in interface CTClassifier
      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 interface CTClassifier
      Returns:
      the name of the classifier
    • main

      public static void main(String[] args)