Class StandardMHTChi2
java.lang.Object
clickTrainDetector.clickTrainAlgorithms.mht.StandardMHTChi2
- All Implemented Interfaces:
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 Summary
-
Constructor Summary
ConstructorDescriptionStandardMHTChi2
(StandardMHTChi2Params pamMHTChi2Params, MHTKernelParams mHTkernalParams) StandardMHTChi2
(StandardMHTChi2Provider standardMHTChi2Provider) Multiplier for the penalty factor applied to track length. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Reset the mhtchi2.void
clearKernelGarbage
(int newRefIndex) Resets to a new start data unit.Clones the MHTChi2- it's vital that this copies the class completely as used to transfer the MHTChi2 algorithms to new branches.static ArrayList<MHTChi2Var<PamDataUnit>>
Create a set of chi^2 variables.double
getChi2()
Calculate the chi2 value for a series of PAM detections.double
getChi2
(int pruneback) Get the chi2 value for n units back in the total time series.Get the chi2 provider.List of current chi2 variables.int
Calculate the number of number of coasts.double
Gte the raw chi^2 value for the last calculated track.int
Get the verbosity level.void
Print chi^2 calculation settings.void
void
setMHTChi2Var
(ArrayList<MHTChi2Var<PamDataUnit>> mhtChi2Vars) Set the MHT chi^2 variables.void
setVerbosity
(int verbosity) Set the verbosityvoid
update
(PamDataUnit newDataUnit, TrackBitSet<PamDataUnit> bitSet, int kcount) Update the function with a new current data unit and the current track.
-
Field Details
-
verbosity
public static int verbosityFlag for verbosity i.e. how much stuff to print to the console.
-
-
Constructor Details
-
StandardMHTChi2
Multiplier for the penalty factor applied to track length. -
StandardMHTChi2
-
-
Method Details
-
createChi2Vars
Create a set of chi^2 variables.- Returns:
- a list of chi2 varibales.
-
update
Description copied from interface:MHTChi2
Update the function with a new current data unit and the current track.- Specified by:
update
in interfaceMHTChi2<PamDataUnit>
- Parameters:
newDataUnit
- - the current detection. This corresponds to the last active index (kcount) in the bitsetbitSet
- - 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 interfaceMHTChi2<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 interfaceMHTChi2<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 interfaceMHTChi2<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 interfaceMHTChi2<PamDataUnit>
-
restoreSettingsPane
public void restoreSettingsPane() -
getMhtChi2Vars
List of current chi2 variables.- Returns:
- list of current chi2 variables.
-
setMHTChi2Var
Set the MHT chi^2 variables.- Parameters:
mhtChi2Var
- - list of mht chi2 variables.
-
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 interfaceMHTChi2<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 interfaceMHTChi2<PamDataUnit>
-
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 interfaceMHTChi2<PamDataUnit>
- Parameters:
newRefIndex
- - the index of the new reference data unit with respect to the old list.
-
getMHTChi2Info
- Specified by:
getMHTChi2Info
in interfaceMHTChi2<PamDataUnit>
-