{"id":19440586,"url":"https://github.com/michaeltoddprogramming/knn-algorithm","last_synced_at":"2026-05-29T16:31:07.135Z","repository":{"id":216644538,"uuid":"741888703","full_name":"michaeltoddprogramming/KNN-Algorithm","owner":"michaeltoddprogramming","description":"The k-Nearest Neighbors algorithm implemented in C++","archived":false,"fork":false,"pushed_at":"2024-01-11T10:21:18.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T07:30:33.124Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michaeltoddprogramming.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-11T10:18:17.000Z","updated_at":"2024-01-11T10:18:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"1745ee3e-019e-483c-b7f3-9e818793ad3f","html_url":"https://github.com/michaeltoddprogramming/KNN-Algorithm","commit_stats":null,"previous_names":["michaeltoddprogramming/knn-algorithm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/michaeltoddprogramming/KNN-Algorithm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeltoddprogramming%2FKNN-Algorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeltoddprogramming%2FKNN-Algorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeltoddprogramming%2FKNN-Algorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeltoddprogramming%2FKNN-Algorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaeltoddprogramming","download_url":"https://codeload.github.com/michaeltoddprogramming/KNN-Algorithm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaeltoddprogramming%2FKNN-Algorithm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33662205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T15:29:45.331Z","updated_at":"2026-05-29T16:31:07.120Z","avatar_url":"https://github.com/michaeltoddprogramming.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KNN-Algorithm\nThe k-Nearest Neighbors algorithm implemented in C++\n\n# What is the KNN Algorithm?\nIt is a simple and widely used supervised machine learning algorithm for classification and regression tasks. It operates on the principle that similar data points are likely to belong to the same class or have similar numeric values.\n\n# How it works...\nTraining Phase: The algorithm stores the entire training dataset in memory.\n\nPrediction Phase: When a new input is provided, the algorithm calculates the distance between the input and all points in the training dataset. The \"k\" nearest neighbors are then identified based on the calculated distances.\n\nClassification (or Regression): For classification tasks, the algorithm assigns the most common class among the k neighbors to the new input. For regression tasks, it calculates the average (or weighted average) of the target values of the k neighbors and assigns this as the predicted value.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaeltoddprogramming%2Fknn-algorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaeltoddprogramming%2Fknn-algorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaeltoddprogramming%2Fknn-algorithm/lists"}