public class Calculate
extends java.lang.Object
Calculate the values of subgroup discovery quality measures with respect to the rules extracted by the algorithm
Constructor and Description |
---|
Calculate() |
Modifier and Type | Method and Description |
---|---|
static void |
Calculate(java.lang.String output_file_tra,
java.lang.String output_file_tst,
java.lang.String input_file_tra,
java.lang.String input_file_tst,
java.lang.String rule_file,
java.lang.String quality_file,
int nlabels)
Calculate is the main method of the Calculate
|
static void |
CaptureDataset(java.lang.String input_file)
Dataset interpretation - read the dataset and stores the values
The attribute designed in "outputs" at the dataset file is the target variable
If it is not established, the last one is taken as output - defined in the methods
that manages the dataset.
|
static int |
CaptureNumRules(java.lang.String nFile)
Return the number of rules obtained by the algorithm
|
static void |
CaptureRules(java.lang.String nFile)
Generate the population with the rules obtained by the algorithm
|
static boolean |
getLost(int example,
int pos)
Returns if the value of the gen of an example is a lost value or not
lost = max value of the variable + 1
|
static int |
getNumAttribute(java.lang.String _name)
It returns the number (position) of the attribute name indicated.
|
static void |
setLost(int example,
int pos)
Sets the value of the gen of an example as an lost value
lost = max value of the variable + 1
|
public static void setLost(int example, int pos)
Sets the value of the gen of an example as an lost value lost = max value of the variable + 1
example
- Position of the example in the datasetpos
- Position of the variablepublic static boolean getLost(int example, int pos)
Returns if the value of the gen of an example is a lost value or not lost = max value of the variable + 1
example
- Position of the example in the datasetpos
- Position of the variablepublic static void CaptureDataset(java.lang.String input_file) throws java.io.IOException
Dataset interpretation - read the dataset and stores the values The attribute designed in "outputs" at the dataset file is the target variable If it is not established, the last one is taken as output - defined in the methods that manages the dataset. All the variables except this are stored in "tabla.ejemplo" Target variable is stored in "tabla.clase"
input_file
- File to capturejava.io.IOException
- if the input file can not be read.public static int getNumAttribute(java.lang.String _name)
It returns the number (position) of the attribute name indicated.
_name
- Name of the attribute.public static void CaptureRules(java.lang.String nFile) throws java.io.IOException
Generate the population with the rules obtained by the algorithm
nFile
- File of the rules obtained by the algorithmjava.io.IOException
- if the rules file can not be read.public static int CaptureNumRules(java.lang.String nFile) throws java.io.IOException
Return the number of rules obtained by the algorithm
nFile
- File of rules obtained by the algorithmjava.io.IOException
- if the rules file can not be read.public static void Calculate(java.lang.String output_file_tra, java.lang.String output_file_tst, java.lang.String input_file_tra, java.lang.String input_file_tst, java.lang.String rule_file, java.lang.String quality_file, int nlabels) throws java.lang.Exception
Calculate is the main method of the Calculate
output_file_tra
- Name of the training output fileoutput_file_tst
- Name of the test output fileinput_file_tra
- Name of the training fileinput_file_tst
- Name of the test filerule_file
- Name of the rule filequality_file
- Name of the output quality filenlabels
- Number of labels for the continuous variablesjava.lang.Exception
- if any of these files can not be read.