knn_C_predict {galgo} | R Documentation

## Class prediction using KNN method calling the C code

### Description

C code for knn. There is a knn_R_predict but R code is slower, which is included for debugging and educational purposes.

### Usage

    knn_C_predict(chr, parent, tr, te, result)

### Arguments

`chr` | Chromosome. Must be integer, use as.integer().
`parent` | Bigbang object.
`tr` | Sample indexes for training vector. Must be integer, use as.integer().
`te` | Sample indexes for test vector. Must be integer, use as.integer().
`result` | 0 indicates to return class prediction, non-zero returns the proportion of samples with same class prediction. Must be integer, use as.integer().

### Value

Vector of classes (integer) or numeric value. Depends on `result` argument.

### Author(s)

Victor Trevino. Francesco Falciani Group. University of Birmingham, U.K.

### See Also

`knn`

[Package galgo version 1.4 Index]