public class ENPCGenerator extends PrototypeGenerator
Modifier and Type | Field and Description |
---|---|
protected int |
numberOfClass
Class number.
|
protected int |
numberOfPrototypes
Number of prototypes.
|
algorithmName, generatedDataSet, SEED, seedDefaultValueList, trainingDataSet
Constructor and Description |
---|
ENPCGenerator(PrototypeSet _trainingDataSet,
int k,
int max)
Build a new ENPCGenerator Algorithm
|
ENPCGenerator(PrototypeSet t,
Parameters parameters)
Build a new RSPGenerator Algorithm
|
Modifier and Type | Method and Description |
---|---|
protected PrototypeSet |
die(PrototypeSet classifier,
double[] quality)
Die operator.
|
protected double |
expectation(double sj,
PrototypeSet S)
Function expectation of class sj in the S prototypeSet., see equation (3).
|
protected void |
fight(PrototypeSet classifier,
PrototypeSet[][] V,
double[] quality) |
static void |
main(java.lang.String[] args)
General main for all the prototoype generators
Arguments:
0: Filename with the training data set to be condensed.
1: Filename which contains the test data set.
3: Seed of the random number generator.
|
protected void |
move(PrototypeSet classifier,
PrototypeSet[][] V)
Moves all to the centroid.
|
protected void |
mutation(PrototypeSet classifier,
PrototypeSet[][] V)
Mutation operator.
|
PrototypeSet |
reduceSet()
Generate a reduced prototype set by the ENPCGenerator method.
|
protected int |
regions(double sj,
PrototypeSet S)
Function regions, see equation (2).
|
protected PrototypeSet[][] |
reproduction(PrototypeSet classifier,
PrototypeSet[][] V)
Reproduction operator.
|
absoluteAccuracy, absoluteAccuracyAndError, absoluteAccuracyKNN, accuracy, accuracy2, desordenar_vector_sin, desordenar_vector, execute, generateReducedDataSet, getResultingAccuracy, getResultingAccuracy, getResults, getResultsOfAccuracy, getResultsOfAccuracy, getSeed, getSetSizeFromPercentage, getSetSizeFromPercentage, getTime, inic_vector_sin, inic_vector, saveResultsOfAccuracyIn, saveResultsOfAccuracyIn, selecRandomSet, setSeed, showResultsOfAccuracy, showResultsOfAccuracy
protected int numberOfPrototypes
protected int numberOfClass
public ENPCGenerator(PrototypeSet _trainingDataSet, int k, int max)
_trainingDataSet
- training dataset.k
- k parameter.max
- maximum number of iterationspublic ENPCGenerator(PrototypeSet t, Parameters parameters)
t
- Original prototype set to be reduced.parameters
- Parameters of the algorithm (only % of reduced set).protected int regions(double sj, PrototypeSet S)
sj
- S
- protected double expectation(double sj, PrototypeSet S)
sj
- S
- protected void mutation(PrototypeSet classifier, PrototypeSet[][] V)
classifier
- classifier prototype setV
- prototype set population.protected PrototypeSet[][] reproduction(PrototypeSet classifier, PrototypeSet[][] V)
classifier
- classifier prototype setV
- prototype set population.protected void fight(PrototypeSet classifier, PrototypeSet[][] V, double[] quality)
protected void move(PrototypeSet classifier, PrototypeSet[][] V)
classifier
- classifier prototype setV
- prototype set population.protected PrototypeSet die(PrototypeSet classifier, double[] quality)
classifier
- classifier prototype setquality
- quality of the prototypes in the set.public PrototypeSet reduceSet()
reduceSet
in class PrototypeGenerator
public static void main(java.lang.String[] args)
args
- Arguments of the main function.