public class LVQPRU extends PrototypeGenerator
Modifier and Type | Field and Description |
---|---|
protected double |
alpha_0
Alpha constant of the internal LVQ2.1 mapping.
|
protected int |
k
Size of the neighborhood used in KNN
|
protected static int |
MINIMUM_CLASS_SET_SIZE
Minimum class part set.
|
protected int |
numberOfIterations
Number of iterations of the LVQPRU algorithm.
|
protected int |
numberOfIterationsLVQ2_1
Number of iterations of the internal LVQ2.1 mapping.
|
protected int |
numberOfPrototypes
Number of prototypes that will be generated.
|
protected double |
percentageOfPrototypes
Percentage of prototypes.
|
protected double |
percentageOfPrototypesPerClass
Percentage of prototypes for each class in initial reduction.
|
protected double |
windowWidth
Window width of the LVQ2.1 algorithm.
|
algorithmName, generatedDataSet, SEED, seedDefaultValueList, trainingDataSet
Constructor and Description |
---|
LVQPRU(PrototypeSet _trainingDataSet,
int numIter,
double pcNpc,
double pcN,
int numIterLVQ2_1,
double a,
double w,
int k)
Builds a LVQPRU algorithm.
|
LVQPRU(PrototypeSet _trainingDataSet,
Parameters parameters)
Constructs a new LVQPRU algorithm.
|
Modifier and Type | Method and Description |
---|---|
protected static int |
indexOfMinElement(java.util.ArrayList<java.lang.Double> array)
Returns the index of the minimum element of an array.
|
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
|
PrototypeSet |
reduceSet()
Execute the method LVQPRU and returns the condensed set
|
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 static int MINIMUM_CLASS_SET_SIZE
protected double percentageOfPrototypesPerClass
protected double percentageOfPrototypes
protected int numberOfPrototypes
protected int numberOfIterations
protected double windowWidth
protected int numberOfIterationsLVQ2_1
protected double alpha_0
protected int k
public LVQPRU(PrototypeSet _trainingDataSet, Parameters parameters)
_trainingDataSet
- parameters
- public LVQPRU(PrototypeSet _trainingDataSet, int numIter, double pcNpc, double pcN, int numIterLVQ2_1, double a, double w, int k)
_trainingDataSet
- Training datasetnumIter
- Number of iterations of the process.pcNpc
- Percentage of number of prototypes per class. Used in initial reduction.pcN
- Percentage of number of prototypes.numIterLVQ2_1
- Number iterations performed by the LVQ2.1 algorithm.a
- Alpha parameter of the LVQ2.1 algorithm.w
- Window width of the LVQ2.1 associated algorithm.k
- K parameter of the LVQ2.1 algorithm.protected static int indexOfMinElement(java.util.ArrayList<java.lang.Double> array)
array
- ArrayList.public PrototypeSet reduceSet()
reduceSet
in class PrototypeGenerator
public static void main(java.lang.String[] args)
args
- Arguments of the main function.