public class ART extends Algorithm
correct, log, modelDataset, modelFileName, resultFileName, startTime, testCorrect, testDataset, testFileName, testOutputFileName, trainDataset, trainFileName, trainOutputFileName
Constructor and Description |
---|
ART(java.lang.String paramFile)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
evaluateItemset(Itemset itemset,
keel.Algorithms.Rule_Learning.ART.Node node)
Function to evaluate the class which the itemset must have according to the classification of the tree.
|
void |
generateTree()
Run the algorithm.
|
static void |
main(java.lang.String[] args)
Main function.
|
void |
printResult()
Writes the tree and the results of the training and the test in the file.
|
void |
printTest()
Evaluates the test dataset and writes the results in the file.
|
void |
printTrain()
Evaluates the training dataset and writes the results in the file.
|
protected void |
setOptions(java.io.StreamTokenizer options)
Function to read the options from the execution file and assign the values to the parameters.
|
java.lang.String |
writeTree(keel.Algorithms.Rule_Learning.ART.Node node,
java.lang.String tab)
Function to write the decision tree in the form of rules.
|
getHeader, initTokenizer
public ART(java.lang.String paramFile)
paramFile
- The parameters file.protected void setOptions(java.io.StreamTokenizer options) throws java.lang.Exception
setOptions
in class Algorithm
options
- The StreamTokenizer that reads the parameters file.java.lang.Exception
- If the format of the file is not correct.public void generateTree()
public java.lang.String writeTree(keel.Algorithms.Rule_Learning.ART.Node node, java.lang.String tab)
node
- The current node.tab
- The indentation of the current rule.public int evaluateItemset(Itemset itemset, keel.Algorithms.Rule_Learning.ART.Node node)
itemset
- The itemset to evaluate.node
- The node that is evaluated at this time.public void printResult() throws java.io.IOException
printResult
in class Algorithm
java.io.IOException
- If the file cannot be written.public void printTrain()
printTrain
in class Algorithm
public void printTest()
public static void main(java.lang.String[] args)
args
- The parameters file.