K-Nearest Neighbors - KNN (ML_CN_2)
This function finds the K number of training examples closest (nearest neighbors) to the input data and then classifying the input data based on the majority class of its nearest neighbors.
Sample Request
{
"project_id": 1,
"parent_id": 7,
"block_id": 8,
"function_code": "ML_CN_2",
"args": {
"model_name": "ClassicModel",
"random_state": 0,
"n_neighbors": 5,
"distance": "minkowski",
"p": 2
}
}Building a K-Nearest Neighbors model
K-Nearest Neighbors
Request Body
Name
Type
Description
Sample Request
Predicting with K-Nearest Neighbors
K-Nearest Neighbors Predict
Request Body
Name
Type
Description
Sample Request
K-Nearest Neighbors Metrics
Request Body
Name
Type
Description
Last updated