public class MCAGenerator extends PNNGenerator
Modifier and Type | Field and Description |
---|---|
protected double |
currentAccuracy
Algorithm Accuracy.
|
numberOfPrototypes, useNumberOfPrototypes
algorithmName, generatedDataSet, SEED, seedDefaultValueList, trainingDataSet
Constructor and Description |
---|
MCAGenerator(PrototypeSet _trainingDataSet)
Build a new algorithm PNNGenerator that will reduce a prototype set.
|
MCAGenerator(PrototypeSet _trainingDataSet,
Parameters parameters)
Build a new algorithm MCAGenerator that will reduce a prototype set.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
isConsistent(PrototypeSet modified)
Informs if a modified prototype set is consistent (is as well as original or is better).
|
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 will contain the test data set
3: k Number of neighbors used in the KNN function
|
protected Prototype |
makeAveragePrototype(Prototype p,
Prototype q)
Builds a new averaged prototype.
|
PrototypeSet |
reduceSet()
Reduce the set by the MCAGenerator method.
|
protected static java.util.ArrayList<Pair<Prototype,Prototype>> |
removeFromCandidates(java.util.ArrayList<Pair<Prototype,Prototype>> nearest,
Prototype p)
Removes a prototype from the list of pairs of the nearest prototypes.
|
controlledReduction, maximumReduction, nearestPrototypesIn
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
public MCAGenerator(PrototypeSet _trainingDataSet, Parameters parameters)
_trainingDataSet
- training dataset.parameters
- Parameters needed for the algoritm, in this case, random seedDefaultValueList only.public MCAGenerator(PrototypeSet _trainingDataSet)
_trainingDataSet
- training dataset.protected static java.util.ArrayList<Pair<Prototype,Prototype>> removeFromCandidates(java.util.ArrayList<Pair<Prototype,Prototype>> nearest, Prototype p)
nearest
- List of nearest prototypes. IT IS MODIFIED.p
- Prototype to be erased from nearest.protected Prototype makeAveragePrototype(Prototype p, Prototype q)
p
- Prototype to be merged.q
- Prototype to be merged.protected boolean isConsistent(PrototypeSet modified)
modified
- Modified prototype set.public PrototypeSet reduceSet()
reduceSet
in class PNNGenerator
public static void main(java.lang.String[] args)
args
- Arguments of the main function.