java.lang.Object
rawDeepLearningClassifier.dlClassification.genericModel.StandardPrediction
All Implemented Interfaces:
PredictionResult
Direct Known Subclasses:
DelphinIDPrediction, KetosResult, SoundSpotResult

public class StandardPrediction extends Object implements PredictionResult
Result from the SoundSpot classifier.
Author:
Jamie Macaulay
  • Field Details

    • analysisTime

      public double analysisTime
      Analysis time in seconds.
  • Constructor Details

    • StandardPrediction

      public StandardPrediction(float[] prob, short[] classNameID, boolean isBinary)
      Constructor for a typical generic prediciton.
      Parameters:
      prob - - the probability for each class.
      classNameID - - the ID's of the class names.
      isBinary - - true if the model result passed a binary test (usually one species above a threshold)
    • StandardPrediction

      public StandardPrediction(float[] prob, boolean isBinary)
    • StandardPrediction

      public StandardPrediction(float[] prob)
      Create a result for the Sound Spot classifier.
      Parameters:
      prob - - the probability of each class.
  • Method Details

    • getPrediction

      public float[] getPrediction()
      Description copied from interface: PredictionResult
      Get the predictions for this result. The array contains the probabilities for all classes.
      Specified by:
      getPrediction in interface PredictionResult
      Returns:
      the prediction.
    • isBinaryClassification

      public boolean isBinaryClassification()
      Description copied from interface: PredictionResult
      Check whether binary classification has passed.
      Specified by:
      isBinaryClassification in interface PredictionResult
      Returns:
      true if binary classification has passed
    • getAnalysisTime

      public double getAnalysisTime()
      Description copied from interface: PredictionResult
      Get the analysis time.
      Specified by:
      getAnalysisTime in interface PredictionResult
      Returns:
      the analysis time.
    • setAnalysisTime

      public void setAnalysisTime(double analysisTime)
    • getResultString

      public String getResultString()
      Description copied from interface: PredictionResult
      String representation of the result
      Specified by:
      getResultString in interface PredictionResult
      Returns:
      a string of the result.
    • getClassNames

      public short[] getClassNames()
      Description copied from interface: PredictionResult
      Get the class name IDs associated with this result. Can be null. @see DLClassNameManager to get strings of class names.
      Specified by:
      getClassNames in interface PredictionResult
      Returns:
      a list of the class name ID for the result. Can be null or an array the same length as getPrediciton();
    • setClassNameID

      public void setClassNameID(short[] classNameID)
      Set the IDs of the class names. Use a class name manager to retrieve the actual String names.
      Parameters:
      classNameID - - the class name IDs.
    • setBinaryClassification

      public void setBinaryClassification(boolean binaryResult)
      Set the binary classification.
      Parameters:
      binaryResult - - the binary classification.
    • getTimeMillis

      public long getTimeMillis()
      Description copied from interface: PredictionResult
      Get the time stamp.
      Specified by:
      getTimeMillis in interface PredictionResult
      Returns:
      the millis datenumber.
    • setTimeMillis

      public void setTimeMillis(long timeMillis)