{"id":32955014,"url":"https://github.com/felipexw/knn-java-library","last_synced_at":"2025-11-13T03:00:56.622Z","repository":{"id":92618391,"uuid":"66849556","full_name":"felipexw/knn-java-library","owner":"felipexw","description":"Just a simple implementation of K-Nearest Neighbour algorithm.","archived":false,"fork":false,"pushed_at":"2016-09-08T13:27:55.000Z","size":356,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-10T14:50:54.487Z","etag":null,"topics":["data-science","k-nearest-neighbor-classifier","k-nearest-neighbours","knn","knn-algorithm","knn-classification","knn-classifier","machine-learning","supervised-learning","supervised-learning-algorithms","supervised-learning-classifiers","supervised-machine-learning"],"latest_commit_sha":null,"homepage":"","language":"Java","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/felipexw.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}},"created_at":"2016-08-29T14:11:40.000Z","updated_at":"2023-12-04T01:59:04.000Z","dependencies_parsed_at":"2023-03-04T06:45:15.593Z","dependency_job_id":null,"html_url":"https://github.com/felipexw/knn-java-library","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/felipexw/knn-java-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipexw%2Fknn-java-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipexw%2Fknn-java-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipexw%2Fknn-java-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipexw%2Fknn-java-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felipexw","download_url":"https://codeload.github.com/felipexw/knn-java-library/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipexw%2Fknn-java-library/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284145006,"owners_count":26954846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-13T02:00:06.582Z","response_time":61,"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":["data-science","k-nearest-neighbor-classifier","k-nearest-neighbours","knn","knn-algorithm","knn-classification","knn-classifier","machine-learning","supervised-learning","supervised-learning-algorithms","supervised-learning-classifiers","supervised-machine-learning"],"created_at":"2025-11-12T22:00:41.097Z","updated_at":"2025-11-13T03:00:56.614Z","avatar_url":"https://github.com/felipexw.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":["[Tools](#tools-1)"],"readme":"# A simple K-Nearest Neighbor (KNN) Java library  #\n\n### What is this repository for? ###\n\n* Its a very simple implementation of K-Nearest Neighbor algorithm for Supervide Learning (user labeled data)\n* __Version 1.0__\n\n### Features presents ###\n\n* The following similarities metrics are presents:\n\t- Euclidian Distance\n\t- Jaccard Distance\n\t- Pearson Correlation\n\t- Cosine Distance\n\t- Minkowski Distance (to be done)\n\t- Manhattan Distance (to be done)\n\t- Mahalanobis Distance (to be done)\n* A naive knn implementation with (or without) k-fold cross-validation.\n\n### How to use ###\n\n* Just clone the project\n* Setup your project\n* Init a ``SimpleKNNClassifier``\n* Inject the ``SimilarityCalculator`` of your choice into ``SimpleKNNClassifier`` instance\n* Fit with some labeled data\n* Train the classifier (you can choose if you want to train using k-fold cross validation or not)\n* Pass some data to ``predict()`` method and see the label predicted","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipexw%2Fknn-java-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelipexw%2Fknn-java-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipexw%2Fknn-java-library/lists"}