rknn_train: Nearest neighbors using rknn

View source: R/rknn.R

rknn_trainR Documentation

Nearest neighbors using rknn

Description

'rknn_train' is a wrapper for 'rknn' fast nearest neighbor models

Usage

rknn_train(x, y = NULL, k = 1, r = 500, mtry = trunc(sqrt(ncol(x))), ...)

Arguments

x

a data frame or matrix of predictors.

y

a vector (factor or numeric) or matrix (numeric) of outcome data.

k

a vector (integer) of the number of neighbours to consider.

r

an integer specifying the number of KNN models containing random feature subsets. Default = 500.

mtry

an integer with the number of features to randomly select per KNN model. Default is 'trunc(sqrt(ncol(x)))'.

...

additional arguments to pass to FNN, currently unused.

Value

list containing the FNN call


stevenpawley/parsnipExtra documentation built on May 28, 2022, 9:38 a.m.