Description Usage Format Usage Methods Arguments Examples
Trains a k nearest neighbour model using fast search algorithms. KNN is a supervised learning algorithm which is used for both regression and classification problems.
1 |
R6Class
object.
For usage details see Methods, Arguments and Examples sections.
1 2 3 |
$new()
Initialise the instance of the trainer
$fit()
trains the knn model and stores the test prediction
$predict()
returns predictions
number of neighbours to predict
if probability should be computed, default=FALSE
algorithm used to train the model, possible values are 'kd_tree','cover_tree','brute'
type of problem to solve i.e. regression or classification, possible values are 'reg' or 'class'
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.