T
- Type of the algorithmpublic abstract class PrototypeGenerationAlgorithm<T extends PrototypeGenerator>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.util.ArrayList<java.lang.String> |
inputFiles
Name of input files.
|
protected static java.util.ArrayList<java.lang.String> |
inputFilesPath
Complete path of input files.
|
protected static InstanceSet |
Itest
Test instances set.
|
protected static java.util.ArrayList<java.lang.String> |
outputFiles
Name of output files.
|
protected static java.util.ArrayList<java.lang.String> |
outputFilesPath
Complete path of output files.
|
protected static java.util.ArrayList<java.lang.String> |
parameters
Parameters given by the console.
|
protected static java.util.ArrayList<java.lang.String> |
parametersName
Name of the parameters.
|
protected static int |
TEST
Type of file: test data set.
|
protected static java.lang.String |
testFileName
Test data set file name.
|
protected static InstanceSet |
train
Training instances set.
|
protected static int |
TRAINING
Type of file: training data set.
|
protected static java.lang.String |
trainingFileName
Training data set file name.
|
protected static int |
TRS
Type of file: trs data set.
|
Constructor and Description |
---|
PrototypeGenerationAlgorithm() |
Modifier and Type | Method and Description |
---|---|
static void |
assertArguments(java.lang.String[] args)
Assert keel-style arguments
|
protected abstract T |
buildNewPrototypeGenerator(PrototypeSet train,
PrototypeSet unlabeled,
PrototypeSet test,
Parameters params)
Build a new generator object for SSL.
|
void |
execute(java.lang.String[] args)
Execute the algorithm given.
|
static void |
printParameters()
Print the parameters of the algorithm.
|
static void |
readParametersFile(java.lang.String config)
Read the keel parameters file.
|
static PrototypeSet |
readPrototypeSet(java.lang.String nameOfFile)
Reads the prototype set from a data file.
|
static PrototypeSet |
readPrototypeSet(java.lang.String nameOfFile,
java.lang.String tipo)
Reads the prototype set from a given file name.
|
static void |
writeOutput(java.lang.String filename,
int[][] realClass,
int[][] prediction,
Attribute[] inputs,
Attribute output,
java.lang.String relation)
Prints output files.
|
protected static java.lang.String trainingFileName
protected static java.lang.String testFileName
protected static java.util.ArrayList<java.lang.String> parameters
protected static java.util.ArrayList<java.lang.String> parametersName
protected static java.util.ArrayList<java.lang.String> inputFilesPath
protected static java.util.ArrayList<java.lang.String> outputFilesPath
protected static java.util.ArrayList<java.lang.String> inputFiles
protected static java.util.ArrayList<java.lang.String> outputFiles
protected static final int TRAINING
protected static final int TRS
protected static final int TEST
protected static InstanceSet train
protected static InstanceSet Itest
public static void readParametersFile(java.lang.String config)
config
- Name of the configuration file.public static void printParameters()
public static PrototypeSet readPrototypeSet(java.lang.String nameOfFile)
nameOfFile
- Name of data file to be read.public static PrototypeSet readPrototypeSet(java.lang.String nameOfFile, java.lang.String tipo)
nameOfFile
- file name given.tipo
- type of the prototype set.protected abstract T buildNewPrototypeGenerator(PrototypeSet train, PrototypeSet unlabeled, PrototypeSet test, Parameters params)
train
- Training data set that will be used for the generator object.unlabeled
- Unlabeled data set.test
- Test data set.params
- Parameters of the algorithm of reduction.public static void assertArguments(java.lang.String[] args)
args
- Console arguments.public void execute(java.lang.String[] args)
args
- Arguments given by console.public static void writeOutput(java.lang.String filename, int[][] realClass, int[][] prediction, Attribute[] inputs, Attribute output, java.lang.String relation)
filename
- Name of output filerealClass
- Real output of instancesprediction
- Predicted output for instancesinputs
- Input attributes.output
- Output attribute.relation
- Relation string.