The KNearestNeighbour
node in SciCraft has the
following node arguments:
- Input ports:
- Xin: Matrix or vector containing the values for
the prediction sample. A vector will be
interpreted as a row vector.
- yin: A vector containing the classes for the samples given
in the input data matrix Xin. yin can be both a vector
of strings with class names, or integers. The length of yin
must therefore match the number of rows in the input data matrix
Xin.
- testin: Matrix of test set cases. In order words,
each row contains the values of the independent variables for
a sample with unknown class. Optional.
- Input arguments:
k: Integer specifying the number of neighbours considered when
making the classification rule.
- Output ports:
- predobjects: Vector of integers containing the
predicted classes for the samples in
the test matrix (If no test data is given this is NULL)
- calerror: The percent wise calibration error for the
classification rule.
- prederror: The percent wise prediction error for the
classification rule estimated using leave-on-out cross-validation.
Bjørn Kåre Alsberg
2006-04-06