Learn R Programming

aurelius (version 0.8.4)

extract_params.knn3: extract_params.knn3

Description

Extract K-nearest neighbor model parameters from a knn3 object created by the caret library

Usage

# S3 method for knn3
extract_params(object, ...)

Arguments

object

an object of class "knn3"

...

further arguments passed to or from other methods

Value

PFA as a list-of-lists that can be inserted into a cell or pool

Examples

Run this code
iris2 <- iris
colnames(iris2) <- gsub('\\.', '_', colnames(iris2))
model <- caret::knn3(Species ~ ., iris2)
extracted_params <- extract_params(model)

Run the code above in your browser using DataLab