fnn_train: Nearest neighbors using FNN

View source: R/fnn.R

fnn_trainR Documentation

Nearest neighbors using FNN

Description

'fnn_train' is a wrapper for 'FNN' fast nearest neighbor models

Usage

fnn_train(x, y = NULL, k = 1, algorithm = "kd_tree", ...)

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.

algorithm

character, one of c("kd_tree", "cover_tree", "brute"), default = "kd_tree"

...

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.