Class StandardMHTChi2

java.lang.Object
clickTrainDetector.clickTrainAlgorithms.mht.StandardMHTChi2
All Implemented Interfaces:
MHTChi2<PamDataUnit>, Cloneable

public class StandardMHTChi2 extends Object implements MHTChi2<PamDataUnit>, Cloneable
The chi^2 calculator for the MHTKernal. This calculates the chi^2 value for a particular track based on a series of MHTChi2Var classes that look for slowly changing values over time for a particular variable e.g. amplitude.

There are also various penalty factors added intended to favour lower ICI values and penalise new tracks being created.

Author:
Jamie Macaulay
  • Field Details

    • verbosity

      public static int verbosity
      Flag for verbosity i.e. how much stuff to print to the console.
  • Constructor Details

  • Method Details

    • createChi2Vars

      public static ArrayList<MHTChi2Var<PamDataUnit>> createChi2Vars()
      Create a set of chi^2 variables.
      Returns:
      a list of chi2 varibales.
    • update

      public void update(PamDataUnit newDataUnit, TrackBitSet<PamDataUnit> bitSet, int kcount)
      Description copied from interface: MHTChi2
      Update the function with a new current data unit and the current track.
      Specified by:
      update in interface MHTChi2<PamDataUnit>
      Parameters:
      newDataUnit - - the current detection. This corresponds to the last active index (kcount) in the bitset
      bitSet - - the bit set.
    • getChi2

      public double getChi2(int pruneback)
      Description copied from interface: MHTChi2
      Get the chi2 value for n units back in the total time series.
      Specified by:
      getChi2 in interface MHTChi2<PamDataUnit>
      Parameters:
      pruneback - - the units to go backwards- note this is the units included and not included in the track.
      Returns:
      the chi2 value for pruneback.
    • getChi2

      public double getChi2()
      Description copied from interface: MHTChi2
      Calculate the chi2 value for a series of PAM detections. The chi2 value indicates consistency of values within a detection train. e.g. it might calculate the consistency of inter-detection interval or amplitude values for a series of click trains.
      Specified by:
      getChi2 in interface MHTChi2<PamDataUnit>
      Returns:
      the chi2 value for the list of detection
    • getNCoasts

      public int getNCoasts()
      Description copied from interface: MHTChi2
      Calculate the number of number of coasts.
      Specified by:
      getNCoasts in interface MHTChi2<PamDataUnit>
      Returns:
      the number of coasts.
    • getRawChi2

      public double getRawChi2()
      Gte the raw chi^2 value for the last calculated track. the raw chi^2 value is the chi^2 values calculated from the enabled MHTChiVars. It has no additional penalty or bonus factors added.
      Returns:
      the raw chi^2 value form the last calculated track.
    • getVerbosity

      public int getVerbosity()
      Get the verbosity level. This shows the amount of print out statemnts.
      Returns:
      the verbosity
    • setVerbosity

      public void setVerbosity(int verbosity)
      Set the verbosity
      Parameters:
      verbosity -
    • printSettings

      public void printSettings()
      Print chi^2 calculation settings.
      Specified by:
      printSettings in interface MHTChi2<PamDataUnit>
    • restoreSettingsPane

      public void restoreSettingsPane()
    • getMhtChi2Vars

      public ArrayList<MHTChi2Var<PamDataUnit>> getMhtChi2Vars()
      List of current chi2 variables.
      Returns:
      list of current chi2 variables.
    • setMHTChi2Var

      public void setMHTChi2Var(ArrayList<MHTChi2Var<PamDataUnit>> mhtChi2Vars)
      Set the MHT chi^2 variables.
      Parameters:
      mhtChi2Var - - list of mht chi2 variables.
    • cloneMHTChi2

      public MHTChi2<PamDataUnit> cloneMHTChi2()
      Description copied from interface: MHTChi2
      Clones the MHTChi2- it's vital that this copies the class completely as used to transfer the MHTChi2 algorithms to new branches.

      Note: this must be a DEEP copy.

      Specified by:
      cloneMHTChi2 in interface MHTChi2<PamDataUnit>
      Returns:
      clone of the current instance.
    • clear

      public void clear()
      Reset the mhtchi2. This will also reset the associated provider.
      Specified by:
      clear in interface MHTChi2<PamDataUnit>
    • getChi2Provider

      public StandardMHTChi2Provider getChi2Provider()
      Get the chi2 provider. This handles the addition of data units and
      Returns:
      standardMHTChi2Provider
    • clearKernelGarbage

      public void clearKernelGarbage(int newRefIndex)
      Description copied from interface: MHTChi2
      Resets to a new start data unit. i.e. the kernel now starts from a new data unit and so some settings in the chi^2 may need to change.
      Specified by:
      clearKernelGarbage in interface MHTChi2<PamDataUnit>
      Parameters:
      newRefIndex - - the index of the new reference data unit with respect to the old list.
    • getMHTChi2Info

      public CTAlgorithmInfo getMHTChi2Info()
      Specified by:
      getMHTChi2Info in interface MHTChi2<PamDataUnit>