public class KSNN extends LazyAlgorithm
confMatrix, initialTime, inputAtt, inputs, modelTime, name, nClasses, nInstances, nulls, outFile, output, prediction, predictions, probabilities, realClass, reference, referenceData, referenceFile, referenceOutput, relation, seed, temp, test, testData, testFile, testOutput, testTime, train, trainConfMatrix, trainData, trainFile, trainingTime, trainOutput, trainPrediction, trainRealClass, trainUnclassified, unclassified
Constructor and Description |
---|
KSNN(java.lang.String script)
The main method of the class
|
Modifier and Type | Method and Description |
---|---|
protected int |
evaluate(double[] example)
Evaluates a instance to predict its class.
|
void |
getFurtherNeighbor()
Calculates, for each train instance, the distance to its
further K neighbour.
|
protected void |
readParameters(java.lang.String script)
Reads configuration script, to extract the parameter's values.
|
euclideanDistance, evaluate2, execute, executeReference, manhattanDistance, normalizeReference, normalizeTest, normalizeTrain, printInstance, readConfiguracion, readDataFiles, readDataFiles, readDataFiles, same, setInitialTime
public KSNN(java.lang.String script)
script
- Name of the configuration scriptprotected void readParameters(java.lang.String script)
readParameters
in class LazyAlgorithm
script
- Name of the configuration scriptpublic void getFurtherNeighbor()
protected int evaluate(double[] example)
evaluate
in class LazyAlgorithm
example
- Instance evaluated