Interface PredictionResult
- All Known Implementing Classes:
DeepAcousticsPrediction,DelphinIDPrediction,KetosResult,OrcaSpotModelResult,SoundSpotResult,StandardPrediction
public interface PredictionResult
Model results for the classifier.
Model results are dependent on the type of deep learning classifier that is being used but all must implement ModelResult. ModelResults are saved to binary files and if there is unique model result data that requires saving then modifications must be made to ModelResultBinaryFactory class
- Author:
- Jamie Macaulay
-
Method Summary
Modifier and TypeMethodDescriptiondoubleGet the analysis time.short[]Get the class name IDs associated with this result.double[]Get frequency limits of the prediction resultfloat[]Get the predictions for this result.String representation of the resultintGet duration in sample - this is the number of samples in the result.longGet the start sample - this is the sample number of the first sample in the result.longGet the time stamp.booleanCheck whether binary classification has passed.
-
Method Details
-
getTimeMillis
long getTimeMillis()Get the time stamp.- Returns:
- the millis datenumber.
-
getStartSample
long getStartSample()Get the start sample - this is the sample number of the first sample in the result. * Note: required for object detection results where the start sample may not be same as the input data- Returns:
- the start sample
-
getSampleDuration
int getSampleDuration()Get duration in sample - this is the number of samples in the result. Note: required for object detection results where the duration is not the same as the input data- Returns:
- the duration of the result in samples.
-
getFreqLimits
double[] getFreqLimits()Get frequency limits of the prediction result- Returns:
- the frequency limits of the prediction result
-
getPrediction
float[] getPrediction()Get the predictions for this result. The array contains the probabilities for all classes.- Returns:
- the prediction.
-
getClassNames
short[] getClassNames()Get the class name IDs associated with this result. Can be null. @see DLClassNameManager to get strings of class names.- Returns:
- a list of the class name ID for the result. Can be null or an array the same length as getPrediciton();
-
isBinaryClassification
boolean isBinaryClassification()Check whether binary classification has passed.- Returns:
- true if binary classification has passed
-
getAnalysisTime
double getAnalysisTime()Get the analysis time.- Returns:
- the analysis time.
-
getResultString
String getResultString()String representation of the result- Returns:
- a string of the result.
-