Class MHTGarbageBot

java.lang.Object
clickTrainDetector.clickTrainAlgorithms.mht.MHTGarbageBot

public class MHTGarbageBot extends Object
Handles removing garbage tracks from an MHT algorithm's probability mix.
Author:
Jamie Macaulay
  • Field Details

    • DETECTION_HARD_LIMIT

      public static int DETECTION_HARD_LIMIT
      This is the maximum number of detections long the click train possibility tree can be. Hopefully within this number of detections the click train will have reset itself due to a gap in the data/ and or self trimmed.
  • Constructor Details

    • MHTGarbageBot

      public MHTGarbageBot()
    • MHTGarbageBot

      public MHTGarbageBot(MHTClickTrainAlgorithm mhtClickTrainAlgorithm)
  • Method Details

    • checkCTGarbageCollect

      public boolean checkCTGarbageCollect(PamDataUnit dataUnit, MHTKernel<PamDataUnit> mhtKernel)
      Checks whether an attempt for a garbage collection of click trains is necessary. If there are simply too many clicks (DETECTION_HARD_LIMIT) then the whole algorithm is reset. Every garbCountNTest clicks the algorithm will check the possibility matrix in the kernel and see of there is empty space at the start. If there is then the possibility matrix is trimmed to remove this section. As long as a single click train never reaches DETECTION_HARD_LIMIT then the possibility matrix will simply keep resizing and click train detector will run indefinitely.
      Parameters:
      dataUnit - - the new data unit
      mhtKernel - - the current MHT Kernel.
      Returns:
      - true if a garbage collection task was executed.
    • checkCTGarbageCollect

      public boolean checkCTGarbageCollect(long currentTimemillis, MHTKernel<PamDataUnit> mhtKernel)
      Check whether a garbage collection of the hypothesis matrix is required based on current time rather than the current data unit.
      Parameters:
      currentTimemillis - - the current time in millis
      mhtKernel - - the MHT kernel
      Returns:
      true if a garbage collect is required.