Coder Social home page Coder Social logo

megyssstaa / lvq4j-example-iris Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 2.0 64 KB

A simple demo of LVQ4J usage on the Iris Data Set

License: Apache License 2.0

Java 100.00%
lvq4j lvq learning-vector-quantization iris iris-classification iris-dataset iris-recognition example examples neural-network

lvq4j-example-iris's Introduction

About

This repository demonstrates a simple example of the LVQ4J library usage on the Iris Data Set, which is, perhaps, the best known study case in the machine classification field.

Building and running (Gradle)

Step 1. Download or clone this repository.

git clone https://github.com/MeGysssTaa/lvq4j-example-iris

Step 2. Build the example.

cd lvq4j-example-iris
./gradlew build

Step 3. Download the Iris Data Set.

Step 4. Run the example:

java -jar build/libs/lvq4j-example-iris-1.0.0.jar <train data file>

Profit! If you did everything correctly, the output you'll see will be similar to this:

lvq4j-example-iris $ java -jar build/libs/lvq4j-example-iris-1.0.0.jar /mnt/e/iris.csv
19:44:56.689 [main]              INFO  Main - Successfully read 150 Iris data records
19:44:56.709 [main]              INFO  Main - Neural network will be training asynchronously!
19:44:56.710 [Iris Train Thread] INFO  LVQ4J - Normalized input in 0 millis with function me.darksidecode.lvq4j.NormalizationFunction$$Lambda$24/1209669119
19:44:56.711 [Iris Train Thread] INFO  LVQ4J - Initialized weights in 0 millis with strategy me.darksidecode.lvq4j.WeightsInitializer$$Lambda$17/1884122755
19:44:56.711 [Iris Train Thread] INFO  LVQ4J - Neural network will begin training from scratch.
19:44:56.753 [Iris Train Thread] INFO  Train Finish Listener - The neural network has finished training!
19:44:56.754 [Iris Train Thread] INFO  Train Finish Listener - ===============================================
19:44:56.755 [Iris Train Thread] INFO  Train Finish Listener -   SUMMARY
19:44:56.756 [Iris Train Thread] INFO  Train Finish Listener -     Overall accuracy: 98.0%
19:44:56.757 [Iris Train Thread] INFO  Train Finish Listener -     Accuracy per cluster (per Iris species):
19:44:56.757 [Iris Train Thread] INFO  Train Finish Listener -       0: 100.0%
19:44:56.757 [Iris Train Thread] INFO  Train Finish Listener -       1: 96.0%
19:44:56.757 [Iris Train Thread] INFO  Train Finish Listener -       2: 98.0%
19:44:56.757 [Iris Train Thread] INFO  Train Finish Listener - ===============================================
19:44:56.758 [Iris Train Thread] INFO  LVQ4J - Training completed. It took 46 millis to run 188 iterations for a final error square
sum of 13.05253438308561

Next steps

See LVQ4J Wiki and try playing with the code, and then write an own classifier that makes use of LVQ4J.

License

Apache License 2.0

lvq4j-example-iris's People

Contributors

megyssstaa avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.