Package rocca
Class RoccaRFModel
java.lang.Object
rocca.RoccaRFModel
- All Implemented Interfaces:
Serializable
Class to hold information about the random forest classifier. This class was
created to facilitate multiple stages of classification. The AbstractClassifier roccaClassifierModel
contains the random forest model itself. The Instances trainedDataset contains the list of species
as well as the list of attributes. The RoccaRFModel modelList array is the same length as the
species list. If a particular species is a 'trigger' for another stage of classification
(eg. 'Small dolphin' which triggers a second classifer based on Common or Striped dolphin)
the next-stage RoccaRFModel is stored here. If the species is not a trigger, the array
position should be loaded with a null.
- Author:
- Mike
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionRoccaRFModel
(weka.classifiers.AbstractClassifier roccaClassifierModel, weka.core.Instances trainedDataset, RoccaRFModel[] modelList) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
classifySighting
(weka.core.DenseInstance sightingParams, int sightingThreshold) Classifies a sighting based on the Instance passedvoid
generateSpList
(ArrayList<String> spList) Generates a list of species in this model.weka.classifiers.AbstractClassifier
weka.core.Instances
void
setModelList
(RoccaRFModel[] modelList) void
setRoccaClassifierModel
(weka.classifiers.AbstractClassifier roccaClassifierModel) void
setTrainedDataset
(weka.core.Instances trainedDataset)
-
Field Details
-
AMBIG
- See Also:
-
-
Constructor Details
-
RoccaRFModel
public RoccaRFModel(weka.classifiers.AbstractClassifier roccaClassifierModel, weka.core.Instances trainedDataset, RoccaRFModel[] modelList) Constructor- Parameters:
roccaClassifierModel
-trainedDataset
-modelList
-
-
-
Method Details
-
classifyContour
-
classifySighting
Classifies a sighting based on the Instance passed- Parameters:
sightingParams
- DenseInstance containing the parameters- Returns:
- The species with the highest tree votes
-
generateSpList
Generates a list of species in this model. Also, if it finds a next-stage model it will call the same method in that one in order to include those species as well.- Parameters:
spList
- original species list
-
getRoccaClassifierModel
public weka.classifiers.AbstractClassifier getRoccaClassifierModel()- Returns:
- the roccaClassifierModel
-
setRoccaClassifierModel
public void setRoccaClassifierModel(weka.classifiers.AbstractClassifier roccaClassifierModel) - Parameters:
roccaClassifierModel
- the roccaClassifierModel to set
-
getTrainedDataset
public weka.core.Instances getTrainedDataset()- Returns:
- the trainedDataset
-
setTrainedDataset
public void setTrainedDataset(weka.core.Instances trainedDataset) - Parameters:
trainedDataset
- the trainedDataset to set
-
getModelList
- Returns:
- the modelList
-
setModelList
- Parameters:
modelList
- the modelList to set
-