public class RoccaClassifier
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AMBIG |
Constructor and Description |
---|
RoccaClassifier(RoccaProcess roccaProcess)
Create RoccaClassifier object for RoccaProcess
|
Modifier and Type | Method and Description |
---|---|
boolean |
areFieldsSet() |
void |
classifyContour(RoccaContourDataBlock rcdb)
NO LONGER USED, since the addition of the RoccaRFModel object
|
void |
classifyContour2(RoccaContourDataBlock rcdb)
Classifies the passed contour
|
void |
clearSpeciesList() |
java.lang.String[] |
generateSpList_orig()
generates list of species classes.
|
java.lang.String[] |
generateSpList()
generates list of species classes.
|
java.lang.String[] |
getClassifierSpList()
returns list of species classes.
|
weka.core.DenseInstance |
setAttributes(RoccaContourDataBlock rcdb)
Sets up the available datablock fields to match the classifier model
|
weka.core.DenseInstance |
setAttributes(RoccaContourDataBlock rcdb,
weka.core.Instances trainedDataset)
Sets up the available datablock fields to match the classifier model
|
void |
setFieldsSet(boolean fieldsSet) |
boolean |
setUpClassifier()
Loads the Classifier model from the file specified in RoccaParameters
|
public static final java.lang.String AMBIG
public RoccaClassifier(RoccaProcess roccaProcess)
roccaProcess
- public void classifyContour(RoccaContourDataBlock rcdb)
Classifies the passed contour
Checks to make sure a classifier has been loaded, then runs the setAttributes method to match the passed contour to the parameter list expected by the classifier. Once the attribute vector has been created, the classifier is run and the results are saved to the datablock's classifiedAs field.
rcdb
- RoccaContourDataBlock
to be classifiedpublic void classifyContour2(RoccaContourDataBlock rcdb)
Checks to make sure a classifier has been loaded, then calls the RoccaRFModel object to classify the contour. Clears the rcdb tree votes first, since the RccaRFModel object adds to the votes as it iterates through the different classifiers
rcdb
- RoccaContourDataBlock
to be classifiedpublic boolean setUpClassifier()
public weka.core.DenseInstance setAttributes(RoccaContourDataBlock rcdb)
Compares the fields in the passed RoccaContourDataBlack to the fields required for the classifier. If any fields are missing, an error is displayed and the method returns false. If all the fields are available, an Instance is created matching the order of the datablock fields to the order of the classifier fields.
rcdb
- RoccaContourDataBlock
to be classifiedInstance
containing the values of the rcdb parameters that
match the classifier attributespublic weka.core.DenseInstance setAttributes(RoccaContourDataBlock rcdb, weka.core.Instances trainedDataset)
Compares the fields in the passed RoccaContourDataBlack to the fields required for the classifier. If any fields are missing, an error is displayed and the method returns false. If all the fields are available, an Instance is created matching the order of the datablock fields to the order of the classifier fields.
rcdb
- RoccaContourDataBlock
to be classifiedtrainedDataset
- Instances
containing the training data setInstance
containing the values of the rcdb parameters that
match the classifier attributespublic boolean areFieldsSet()
public void setFieldsSet(boolean fieldsSet)
public java.lang.String[] getClassifierSpList()
public void clearSpeciesList()
speciesList
- the speciesList to setpublic java.lang.String[] generateSpList()
public java.lang.String[] generateSpList_orig()