hai_knn_data_prepper {healthyR.ai} | R Documentation |
Prep Data for k-NN - Recipe
Description
Automatically prep a data.frame/tibble for use in the k-NN algorithm.
Usage
hai_knn_data_prepper(.data, .recipe_formula)
Arguments
.data |
The data that you are passing to the function. Can be any type
of data that is accepted by the |
.recipe_formula |
The formula that is going to be passed. For example
if you are using the |
Details
This function will automatically prep your data.frame/tibble for use in the k-NN algorithm. The k-NN algorithm is a lazy learning classification algorithm. It expects data to be presented in a certain fashion.
This function will output a recipe specification.
Value
A recipe object
Author(s)
Steven P. Sanderson II, MPH
See Also
Other Preprocessor:
hai_c50_data_prepper()
,
hai_cubist_data_prepper()
,
hai_data_impute()
,
hai_data_poly()
,
hai_data_scale()
,
hai_data_transform()
,
hai_data_trig()
,
hai_earth_data_prepper()
,
hai_glmnet_data_prepper()
,
hai_ranger_data_prepper()
,
hai_svm_poly_data_prepper()
,
hai_svm_rbf_data_prepper()
,
hai_xgboost_data_prepper()
Other knn:
hai_glmnet_data_prepper()
Examples
library(ggplot2)
hai_knn_data_prepper(.data = Titanic, .recipe_formula = Survived ~ .)
rec_obj <- hai_knn_data_prepper(iris, Species ~ .)
get_juiced_data(rec_obj)