{"id":19915046,"url":"https://github.com/megyssstaa/lvq4j","last_synced_at":"2026-04-24T21:33:59.481Z","repository":{"id":131062558,"uuid":"271825495","full_name":"MeGysssTaa/lvq4j","owner":"MeGysssTaa","description":"LVQ (Learning Vector Quantization) library for Java","archived":false,"fork":false,"pushed_at":"2021-12-13T20:42:22.000Z","size":132,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-02T20:38:06.208Z","etag":null,"topics":["api","easy-to-use","gradle","gradle-java","java","learning-vector-quantization","library","lvq","lvq4j","machine-learning","machinelearning","neural-network","neural-networks","neuralnetwork","neuralnetworks","simple"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MeGysssTaa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-06-12T15:03:04.000Z","updated_at":"2023-01-22T18:16:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"82e29847-228c-4dd8-ba91-6b28d00819ac","html_url":"https://github.com/MeGysssTaa/lvq4j","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MeGysssTaa/lvq4j","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeGysssTaa%2Flvq4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeGysssTaa%2Flvq4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeGysssTaa%2Flvq4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeGysssTaa%2Flvq4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MeGysssTaa","download_url":"https://codeload.github.com/MeGysssTaa/lvq4j/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MeGysssTaa%2Flvq4j/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32241794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","easy-to-use","gradle","gradle-java","java","learning-vector-quantization","library","lvq","lvq4j","machine-learning","machinelearning","neural-network","neural-networks","neuralnetwork","neuralnetworks","simple"],"created_at":"2024-11-12T21:38:11.909Z","updated_at":"2026-04-24T21:33:59.464Z","avatar_url":"https://github.com/MeGysssTaa.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\r\n**LVQ4J** is a basic implementation of the [LVQ](https://en.wikipedia.org/wiki/Learning_vector_quantization) (Learning Vector Quantization) [prototype-based](https://en.wikipedia.org/wiki/Prototype) [supervised](https://en.wikipedia.org/wiki/Supervised_learning) [classification](https://en.wikipedia.org/wiki/Statistical_classification) [algorithm](https://en.wikipedia.org/wiki/Algorithm) written in **Java**, and an accompanying library for its easier use and setup.\r\n\r\n\r\n# Heads up\r\n**[I](https://github.com/MeGysssTaa)** **am not** a professional data scientist in any way. I created this library solely for my own small research purposes in the machine learning field according to some publicly available papers, articles, and tutorials.\r\n\r\n\r\n\u003e For this reason, I hereby state that **I cannot guarantee that this implementation is 100% accurate and will always work as expected**. Use LVQ4J in your projects **on your own risk**. \r\n\r\n\r\n# Contributing\r\n* If you believe something is wrong with my LVQ implementation, or if you are having troubles using the API, **[please open an issue](https://github.com/MeGysssTaa/lvq4j/issues)**.\r\n* If you want to make direct changes to the code of the library or the LVQ implementation itself, **[don't hesitate to make a pull request](https://github.com/MeGysssTaa/lvq4j/pulls)**!\r\n\r\n\r\n# Why LVQ4J?\r\nThe main intention of LVQ4J is to provide a simple, user-friendly, and, most importantly, **lightweight** API for creating, training and using Learning Vector Quantization algorithms for classification (prediction) purposes. It might not be as optimized, as fast, or as powerful as other libraries, but it is a considerably good starting point for data science *beginners*. The code is pretty **small**, **easy to understand**, and is **well-documented**.\r\n\u003e If you are looking for a robust and/or GPU-optimized machine learning library, then you are wrong here. *Otherwise, if you're just a data newbie who would like to get started with LVQ, then you will probably love this library.*\r\n\r\n\r\n# Features\r\n* Basic implementation of the **[LVQ model](https://en.wikipedia.org/wiki/Learning_vector_quantization)** in pure Java;\r\n* a variety of built-in **[input normalization](https://en.wikipedia.org/wiki/Normalization_(statistics))** functions;\r\n* several premade **weights initialization** strategies;\r\n* many default **[distance metrics](https://en.wikipedia.org/wiki/Metric_(mathematics))**;\r\n* comparably high **level of abstraction** for beginners, yet with deep access to the neural network **at its lowest level** for experienced users;\r\n* LVQ4J is **extremely lightweight** — the library itself is small, and the only dependency is **`Slf4j (log4j2)`**, which is **not _required_** thanks to a default *fallback* logger implementation.\r\n\r\n\r\n# LVQ vs k-nn vs Deep Learning\r\nIn a nutshell, **LVQ** is an **\"eagerly-learning\"** variant of **[k-nn](https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm)**. LVQ is a **neural network**, whereas k-nn **is not**. It takes pretty long for an LVQ model to train, however, the performance of its predictions is a lot better compared to k-nn that has to do its CPU-heavy tricks on **every** classification due to its **\"lazy\"** learning nature. Moreover, LVQ can work with accuracy similar to that of a k-nn even with a significantly smaller amount of train data.\r\n\r\n\r\nNevertheless, LVQ is still one of the simplest neural network algorithms. In most cases its sole advantage over **[deep learning](https://en.wikipedia.org/wiki/Deep_learning)** (e.g. **[RNN](https://en.wikipedia.org/wiki/Recurrent_neural_network)** or **[SVM](https://en.wikipedia.org/wiki/Support_vector_machine)**) algorithms is that it is very **easy to implement** and setup for instant use. Compared to other **neural networks**, one does not have to have a lot of specific knowledge and experience in order to work with an LVQ model.\r\n\r\n\r\n# Usage\r\n## Maven\r\n```xml\r\n\u003crepositories\u003e\r\n    \u003crepository\u003e\r\n        \u003cid\u003ereflex.public\u003c/id\u003e\r\n        \u003cname\u003ePublic Reflex Repository\u003c/name\u003e\r\n        \u003curl\u003ehttps://archiva.reflex.rip/repository/public/\u003c/url\u003e\r\n    \u003c/repository\u003e\r\n\u003c/repositories\u003e\r\n\r\n\u003cdependencies\u003e\r\n    \u003cdependency\u003e\r\n        \u003cgroupId\u003eme.darksidecode.lvq4j\u003c/groupId\u003e\r\n        \u003cartifactId\u003elvq4j\u003c/artifactId\u003e\r\n        \u003cversion\u003e1.2.1\u003c/version\u003e\r\n    \u003c/dependency\u003e\r\n\u003c/dependencies\u003e\r\n```\r\n\r\n\r\n## Gradle\r\n```groovy\r\nrepositories {\r\n    maven {\r\n        name 'Public Reflex Repository'\r\n        url 'https://archiva.reflex.rip/repository/public/'\r\n    }\r\n}\r\n\r\ndependencies {\r\n    implementation group: 'me.darksidecode.lvq4j', name: 'lvq4j', version: '1.2.1'\r\n}\r\n```\r\n\r\n\r\n# Examples\r\n* [Iris Data Set](https://github.com/MeGysssTaa/lvq4j-example-iris)\r\n\r\n\u003e Using **LVQ4J** in an own project? Want it to be listed here? **[Feel free to make a pull request!](https://github.com/MeGysssTaa/lvq4j/pulls)**\r\n\r\n\r\n# Bulding\r\n```bash\r\ngit clone https://github.com/MeGysssTaa/lvq4j\r\ncd lvq4j\r\n./gradlew build\r\n```\r\n\r\n\r\n# License\r\n**[Apache License 2.0](https://github.com/MeGysssTaa/lvq4j/blob/master/LICENSE)**\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegyssstaa%2Flvq4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmegyssstaa%2Flvq4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegyssstaa%2Flvq4j/lists"}