Skip to content

Apply KNN algorithm to classify whether cancer is present or not. Implemented Pipeline, GridSearchCV, Elbow method to fit the best model.

Notifications You must be signed in to change notification settings

sudheer1098/cancer-prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Cancer Prediction using KNN_classification

Apply KNN algorithm to classify whether cancer is present or not. Implemented Pipeline, GridSearchCV, Elbow method to fit the best model.

Steps invovled

  • Import the modules and dependencies.
  • Load the dataset.
  • Analyse the dataset, get shape and info and check for null values and balance of the dataset.
  • Slice the data into features and label.
  • Split the data into training dataset and testing dataset.
  • Apply feature scaling features of training and testing datasets.
  • Apply KNN algorithm with k=1.
  • Evaluate the model.
  • Improve the model with Full Cross Validation.
    • Use Elbow method to find reasonable k values.
    • Implement full cross validation using GridSearchCV.
    • Create a Pipeline and parameters grid of k values to fit GridSearchCV.
    • Evaluate the final model.

Conclusion

Implemented KNN classification and improved the model with Full Cross Validation using Elbow method,Pipeline and GridSearchCV.

About

Apply KNN algorithm to classify whether cancer is present or not. Implemented Pipeline, GridSearchCV, Elbow method to fit the best model.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published