public class PUBLIC
extends java.lang.Object
Constructor and Description |
---|
PUBLIC(java.lang.String script)
Creates a PUBLIC instance by reading the script file that contains all the information needed
for running the algorithm
|
Modifier and Type | Method and Description |
---|---|
int |
evaluateItem(double[] item,
java.util.ArrayList<myAttribute> atts)
Classifies a given item with the information stored in the tree
|
void |
execute()
This method performs the classification for all the instances: the train and the test sets
|
void |
print(myDataset data,
java.lang.String filename,
int type)
Prints in a file the result of the classification made with the tree generated by the PUBLIC
algorithm.
|
void |
printResults(myDataset data,
java.lang.String filename)
Prints in a file the result of the classification made with the tree generated by the PUBLIC
algorithm, this means, the tree itself and the general information about it
|
protected void |
readConfiguration(java.lang.String script)
Reads the configuration script, and extracts its contents.
|
protected void |
readParameters(java.lang.String script)
Reads the configuration script, to extract the parameter's values
|
public PUBLIC(java.lang.String script)
script
- The configuration script which contains the parameters of the algorithmpublic void execute()
protected void readConfiguration(java.lang.String script)
script
- Name of the configuration scriptprotected void readParameters(java.lang.String script)
script
- Name of the configuration scriptpublic int evaluateItem(double[] item, java.util.ArrayList<myAttribute> atts)
item
- Data attribute values for the item we are classifyingatts
- Attributes in the data set that are used for building the tree and describing the
instance givenpublic void print(myDataset data, java.lang.String filename, int type)
data
- Dataset that we are classifyingfilename
- Name of the file that is going to store the resultstype
- 0 if we are working with a train set, 1 if we are working with a test setpublic void printResults(myDataset data, java.lang.String filename)
data
- Dataset that we are working withfilename
- Name of the file that is going to store the results