public class DataSqueezer extends Algorithm
correct, log, modelDataset, modelFileName, resultFileName, startTime, testCorrect, testDataset, testFileName, testOutputFileName, trainDataset, trainFileName, trainOutputFileName
Constructor and Description |
---|
DataSqueezer(java.lang.String paramFile)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
evaluateItemset(Itemset i)
Function to evaluate the class which the itemset must have according to the classification of the rules.
|
void |
generateRules()
Run the DataSqueezer algorithm
Francisco Charte - 16-ene-2010
|
static void |
main(java.lang.String[] args)
Main function.
|
void |
printResult()
Writes the rules 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 |
writeRules()
Function to write the list of rules.
|
getHeader, initTokenizer
public DataSqueezer(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 generateRules()
public java.lang.String writeRules()
public int evaluateItemset(Itemset i)
i
- The itemset to evaluate.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.