public abstract class Algorithm
extends java.lang.Object
Abstract class that contains the basic structures to implements Rule learining algorithms.
Modifier and Type | Field and Description |
---|---|
protected int |
correct
Correctly classified itemsets.
|
protected static java.io.BufferedWriter |
log
The log file.
|
protected MyDataset |
modelDataset
The model dataset.
|
protected static java.lang.String |
modelFileName
The name of the file that contains the information to build the model.
|
protected static java.lang.String |
resultFileName
The name of the result file.
|
protected long |
startTime
The instant of starting the algorithm.
|
protected int |
testCorrect
Correctly classified in test.
|
protected MyDataset |
testDataset
The test dataset.
|
protected static java.lang.String |
testFileName
The name of the file that contains the information to make the test.
|
protected static java.lang.String |
testOutputFileName
The name of the test output file.
|
protected MyDataset |
trainDataset
The train dataset.
|
protected static java.lang.String |
trainFileName
The name of the file that contains the information to make the training.
|
protected static java.lang.String |
trainOutputFileName
The name of the train output file.
|
Constructor and Description |
---|
Algorithm() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getHeader()
Function to get the name of the relation and the names, types and possible values of every attribute in
a dataset.
|
protected boolean |
getNextToken(java.io.StreamTokenizer tokenizer)
Puts the tokenizer in the first token of the next line.
|
protected void |
initTokenizer(java.io.StreamTokenizer tokenizer)
Function to initialize the stream tokenizer.
|
protected static java.lang.String modelFileName
protected static java.lang.String trainFileName
protected static java.lang.String testFileName
protected static java.lang.String trainOutputFileName
protected static java.lang.String testOutputFileName
protected static java.lang.String resultFileName
protected int correct
protected int testCorrect
protected MyDataset modelDataset
protected MyDataset trainDataset
protected MyDataset testDataset
protected static java.io.BufferedWriter log
protected long startTime
protected void initTokenizer(java.io.StreamTokenizer tokenizer)
tokenizer
- The tokenizer.protected java.lang.String getHeader()
protected boolean getNextToken(java.io.StreamTokenizer tokenizer) throws java.lang.Exception
tokenizer
- The tokenizer which reads this function.java.lang.Exception
- If cannot read the tokenizer.