public class VQGenerator extends LVQ1
Modifier and Type | Field and Description |
---|---|
protected double |
inverseOfNumberOfIterations
Inverse of the number of iterations which performs the algorithm.
|
protected int |
k
Nearest-neighbors selected to assign class to each prototype of the selected data set.
|
alpha_0, ALPHA_DEFAULT_VALUE, chosenRandomIndex, IALPHA, randomIndexes
initial, initialset, iterations, numberOfPrototypesGenerated
algorithmName, generatedDataSet, SEED, seedDefaultValueList, trainingDataSet
Constructor and Description |
---|
VQGenerator(PrototypeSet t,
int iterations,
double pcNprots,
double alpha_0,
int k)
Constructs a new VQGenerator algorithm (using 1-Np rule).
|
VQGenerator(PrototypeSet t,
int iterations,
int np,
double alpha_0,
int k)
Constructs a new VQGenerator algorithm.
|
VQGenerator(PrototypeSet t,
Parameters param)
Constructs a new VQGenerator algorithm (using K-Np rule).
|
Modifier and Type | Method and Description |
---|---|
protected void |
correct(Prototype i,
PrototypeSet tData)
Corrects the instance using a particular 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
2: Number of iterations of the algorithm.
3: Number of prototypes of the generated set.
4: Alpha0 constant of the process.
5: k Number of neighbors used in the KNN function
|
PrototypeSet |
reduceSet()
Execute the method and returns the output instance set
|
protected void |
updateAlpha(int t)
Update alpha in stage t to the stage t+1
|
extract, initDataSet, initDataSetRandomMode, penalize, reward
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 double inverseOfNumberOfIterations
protected int k
public VQGenerator(PrototypeSet t, int iterations, int np, double alpha_0, int k)
t
- Training data prototypes.iterations
- Number of iterations that will execute the algorithm.np
- Number of prototypes to be returned.alpha_0
- Alpha algorithm parameter.k
- Number of nearest-neightbors to be searched in original data set for each prototype of the extracted set.public VQGenerator(PrototypeSet t, int iterations, double pcNprots, double alpha_0, int k)
t
- Training data prototypes.iterations
- Number of iterations that will execute the algorithm.pcNprots
- % of prototypes of training to be returned.alpha_0
- Alpha algorithm parameter.k
- Number of nearest-neightbors to be searched in original data set for each prototype of the extracted set.public VQGenerator(PrototypeSet t, Parameters param)
t
- Training data prototypes.param
- Parameters of the method.protected void updateAlpha(int t)
t
- Stage of the algorithm (iteration of the process).protected void correct(Prototype i, PrototypeSet tData)
public PrototypeSet reduceSet()
reduceSet
in class LVQGenerator
public static void main(java.lang.String[] args)
args
- Arguments of the main function.