public class PNNGenerator extends PrototypeGenerator
Modifier and Type | Field and Description |
---|---|
protected int |
numberOfPrototypes
Number of prototypes to be generated.
|
protected boolean |
useNumberOfPrototypes
Informs if the algorithm must generate a specified number of prototypes.
|
algorithmName, generatedDataSet, SEED, seedDefaultValueList, trainingDataSet
Constructor and Description |
---|
PNNGenerator(PrototypeSet tSet)
Build a new algorithm PNNGenerator that will reduce a prototype set.
|
PNNGenerator(PrototypeSet tSet,
double percentageOfPrototypes)
Build a new algorithm PNNGenerator that will reduce a prototype set.
|
PNNGenerator(PrototypeSet tSet,
int numberOfProts)
Build a new algorithm PNNGenerator that will reduce a prototype set.
|
PNNGenerator(PrototypeSet _trainingDataSet,
Parameters parameters)
Build a new algorithm PNNGenerator that will reduce a prototype set.
|
Modifier and Type | Method and Description |
---|---|
protected PrototypeSet |
controlledReduction()
Performs a reduction of the training data set by the PNNGenerator (aka Chang) method.
|
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 wich contains the test data set.
3: Seed of the Random Number Generator.
4: number of prototypes to be generated (OPTIONAL)
|
protected PrototypeSet |
maximumReduction()
Performs the maximum reduction of the training data set by the PNNGenerator (aka Chang) method.
|
protected Pair<Prototype,Prototype> |
nearestPrototypesIn(PrototypeSet A,
PrototypeSet B,
MatrixOfDistances m)
Returns the two nearest prototypes in two different sets.
|
PrototypeSet |
reduceSet()
Performs a reduction of the training data set by the PNNGenerator (aka Chang) method.
|
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 boolean useNumberOfPrototypes
protected int numberOfPrototypes
public PNNGenerator(PrototypeSet tSet)
tSet
- Traning data set to be reduced.public PNNGenerator(PrototypeSet tSet, int numberOfProts)
tSet
- Traning data set to be reduced.numberOfProts
- Number of prototypes to be generated.public PNNGenerator(PrototypeSet tSet, double percentageOfPrototypes)
tSet
- Traning data set to be reduced.percentageOfPrototypes
- Percentage of prototypes of training to be generated.public PNNGenerator(PrototypeSet _trainingDataSet, Parameters parameters)
_trainingDataSet
- training datast.parameters
- Parameters needed for the algoritm, in this case, random seedDefaultValueList only.protected Pair<Prototype,Prototype> nearestPrototypesIn(PrototypeSet A, PrototypeSet B, MatrixOfDistances m)
A
- Set which first prototype belongs to.B
- Set which second prototype belongs to.m
- matrix of distances.protected PrototypeSet maximumReduction()
protected PrototypeSet controlledReduction()
public PrototypeSet reduceSet()
reduceSet
in class PrototypeGenerator
public static void main(java.lang.String[] args)
args
- Arguments of the main function.