Package rocca

Class RoccaRFModel

java.lang.Object
rocca.RoccaRFModel
All Implemented Interfaces:
Serializable

public class RoccaRFModel extends Object implements 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 Details

  • Constructor Details

    • RoccaRFModel

      public RoccaRFModel(weka.classifiers.AbstractClassifier roccaClassifierModel, weka.core.Instances trainedDataset, RoccaRFModel[] modelList)
      Constructor
      Parameters:
      roccaClassifierModel -
      trainedDataset -
      modelList -
  • Method Details

    • classifyContour

      public void classifyContour(RoccaClassifier rc, RoccaContourDataBlock rcdb)
    • classifySighting

      public String classifySighting(weka.core.DenseInstance sightingParams, int sightingThreshold)
      Classifies a sighting based on the Instance passed
      Parameters:
      sightingParams - DenseInstance containing the parameters
      Returns:
      The species with the highest tree votes
    • generateSpList

      public void generateSpList(ArrayList<String> spList)
      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

      public RoccaRFModel[] getModelList()
      Returns:
      the modelList
    • setModelList

      public void setModelList(RoccaRFModel[] modelList)
      Parameters:
      modelList - the modelList to set