Learn R Programming

bnnSurvival (version 0.1.5)

get_best_k: Get optimal number of neighbors

Description

Get optimal number of neighbors for bnnSurvival by cross validation

Usage

get_best_k(formula, data, k, ...)

Arguments

formula
Formula
data
Data
k
Number of neighbors
...
Further arguments passed to bnnSurvival

Value

Optimal k