Description Usage Arguments Value Author(s) References Examples
Tests each provided k value and plots it as well as returning the minimum error value and related k-values. This cross validation method works with more than two colors.
knn_cv_
is the alternate and less graphical version
1 2 3 |
df |
The dataframe to test |
... |
Columns to determine distance in knn prediction |
color |
The predicted column |
k |
The k-values to test the data with |
nfold |
The ratio of train rows to test rows as well as the times to test |
times |
How many folds to preduce |
na.action |
What to do with NA values. |
l |
minimum vote for definite decision, otherwise |
prob |
If this is true, the proportion of the votes for the winning class are returned as attribute |
use.all |
controls handling of ties. If true, all distances equal to the kth largest are included. If false, a random selection of distances equal to the |
A list of objects:
$err
: A table of all predictions
$sum
: Summary of the data
$plot
: The plot of the knn_cv
$min
: The minumum value(s) as a table
zekrom_vale
knn The function that
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.