Class DummyClassifier
java.lang.Object
rawDeepLearningClassifier.dlClassification.dummyClassifier.DummyClassifier
- All Implemented Interfaces:
DLClassiferModel
Classifier which returns a random results. Used for debugging and testing.
- Author:
- Jamie Macaulay
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called whenever PAMGuard stops.Get the number of output classes.Reference to the dlControlA settings object that can be saved.Check whether a model has been selected and can be loaded successfully.Get any UI components for the model.getName()
Get the name of the model.int
Get the number of output classes.boolean
isModelType
(URI uri) Check whether a URI is compatible with a classification frameworkvoid
Prepare the model.ArrayList<? extends PredictionResult>
runModel
(ArrayList<? extends PamDataUnit> rawDataUnit) Run the deep learning model on a list of grouped raw data units and return a corresponding list of model results.Called whenever PAMGuard stops.
-
Constructor Details
-
DummyClassifier
public DummyClassifier()
-
-
Method Details
-
prepModel
public void prepModel()Description copied from interface:DLClassiferModel
Prepare the model. This is called on PAMGuard start up.- Specified by:
prepModel
in interfaceDLClassiferModel
-
closeModel
public void closeModel()Description copied from interface:DLClassiferModel
Called whenever PAMGuard stops.- Specified by:
closeModel
in interfaceDLClassiferModel
-
getName
Description copied from interface:DLClassiferModel
Get the name of the model.- Specified by:
getName
in interfaceDLClassiferModel
- Returns:
- the name of the model.
-
getModelUI
Description copied from interface:DLClassiferModel
Get any UI components for the model. Can be null.- Specified by:
getModelUI
in interfaceDLClassiferModel
- Returns:
- UI components for the model.
-
getDLModelSettings
Description copied from interface:DLClassiferModel
A settings object that can be saved.- Specified by:
getDLModelSettings
in interfaceDLClassiferModel
- Returns:
- the settings object.
-
getNumClasses
public int getNumClasses()Description copied from interface:DLClassiferModel
Get the number of output classes.- Specified by:
getNumClasses
in interfaceDLClassiferModel
- Returns:
- the number of output classes.
-
getClassNames
Description copied from interface:DLClassiferModel
Get the number of output classes.- Specified by:
getClassNames
in interfaceDLClassiferModel
- Returns:
- the number of output classes.
-
runModel
Description copied from interface:DLClassiferModel
Run the deep learning model on a list of grouped raw data units and return a corresponding list of model results.Note the reason we use list is that often it is more efficient to get a model to predict a stacked group of inputs rather than one at a time.
- Specified by:
runModel
in interfaceDLClassiferModel
- Returns:
- the deep learning model.
-
getDLControl
Description copied from interface:DLClassiferModel
Reference to the dlControl- Specified by:
getDLControl
in interfaceDLClassiferModel
- Returns:
- reference to the DL control.
-
getModelStatus
Description copied from interface:DLClassiferModel
Check whether a model has been selected and can be loaded successfully.- Specified by:
getModelStatus
in interfaceDLClassiferModel
-
isModelType
Description copied from interface:DLClassiferModel
Check whether a URI is compatible with a classification framework- Specified by:
isModelType
in interfaceDLClassiferModel
- Parameters:
uri
- - the URI to the model- Returns:
- true if the model is compatible.
-
setModel
Description copied from interface:DLClassiferModel
Called whenever PAMGuard stops.- Specified by:
setModel
in interfaceDLClassiferModel
- Returns:
-