Skip to content

Preparation of training and test samples, cross-validation and selection of hyperparameters on the example of the nearest neighbor method.

Notifications You must be signed in to change notification settings

shimolina-polina/KNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

KNN

Preparation of training and test samples, cross-validation and selection of hyperparameters on the example of the nearest neighbor method.

As a data set, we will use a data set for predicting diabetes in women - https://www.kaggle.com/datasets/uciml/pima-indians-diabetes-database

  1. Using the train_test_split method to divide the sample into training and test.
  2. Training the nearest neighbor model for an arbitrarily given hyperparameter K. Evaluation of the quality of the model.
  3. Selection of hyperparameter K using Grid Search CV, RandomizedSearchCV and cross-validation
  4. Evaluation of the quality of the optimal model.
  5. Comparison of the quality metrics of the initial and optimal models.

About

Preparation of training and test samples, cross-validation and selection of hyperparameters on the example of the nearest neighbor method.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages