Simple Artificial Neural Network java library

Overview

SANN

Simple Artificial Neural Network java library
WIP

Creating neural network

Variant 1

//create new net (input, hidden, default len, output)
Net net = new Net(3, 2, 2, 1);

//initialize weights and fill weights randomly
net.setup();

Variant 2 (same structure)

//create net
Net net = new Net();
//add layers (layers, neurons in layers)
net.addLayers(1, 3);
net.addLayers(2, 2);
net.addLayers(1, 1);

//initialize weights and fill weights randomly
net.setup();

Training

double[][] input = {{1.0d, 0.0d, 1.0d}, {0.0d, 1.0d, 0.0d}, {0.0d, 0.0d, 1.0d}, {1.0d, 0.0d, 1.0d}};

double[][] output = {{1.0d}, {0.0d}, {0.0d}, {1.0d}};
//setting up target values for training
net.setTrainingData(input, output);
//start training (k, iterations)
net.train(0.2, 10000);

Listeners

net.setOnTrainingListener(new Net.OnTrainingListener() {
	@Override
	public void onTraining(int iteration, double error) {
		//doingSomething();
	}
	@Override
	public void onTrainingFinished(int iteration, double error) {
		//doingSomething();
	}
});

Implementation

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}
dependencies {
	implementation 'com.github.korpusovmax:simple-ann:$version' // use version from releases or use '-SNAPSHOT'
}
You might also like...
A simple screen starter written in kotlin

screen-starter A simple screen starter written in kotlin. Compilation Use clean shadowJar! Usage Use java -jar screen-starter-1.0-SNAPSHOT.jar --confi

This repository contains a simple script that lets you kill gradle and kotlin daemons.

AndroidDaemonKiller This repository contains a simple script that lets you kill gradle and kotlin daemons. After updating gradle or kotlin or checking

Simple system for building dialogue in Cepi

Dialogue Dialogue builder for Cepi Installation Download the jar from Releases OR compile it yourself. Instructions to do so are in Compile header Dro

A simple and scalable Android bot emulation framework, as presented at Black Hat Europe's Arsenal

m3 A simple and scalable Android bot emulation framework. A detailed explanation can be found here. This project was first published at Black Hat Euro

Create a simple one screen application with scrollable table view

Create a simple one screen application with scrollable table view

Simple spring boot JWT authentication example

JWT authentication This an example how to set up jwt authentication with access and refresh token. Related blog post is available here: https://coding

AboutLibraries is a library to offer some information of libraries.
AboutLibraries is a library to offer some information of libraries.

AboutLibraries .. allows you to easily create an used open source libraries fragment/activity within your app. All the library information is automati

An android library for displaying fps from the choreographer and percentage of time with two or more frames dropped
An android library for displaying fps from the choreographer and percentage of time with two or more frames dropped

DEPRECATED TinyDancer is deprecated. No more development will be taking place. Check out the Google Android developer documentation for UI performance

Android Library to help you with your runtime Permissions.
Android Library to help you with your runtime Permissions.

PermissionHelper Android Library to help you with your runtime Permissions. Demo Android M Watch it in action. Pre M Watch it in action. Nexus 6 (M) N

Comments
  • Upload library to maven

    Upload library to maven

    For now, it is hard to work normally with this library because it isn't compatible with maven. You should upload it somewhere (to maven central or somewhere else).

    opened by y9vad9 0
Releases(v1.0)
  • v1.0(Oct 20, 2021)

    What's Changed

    • feat: repository converted into gradle project & added publication to jitpack.io by @y9neon in https://github.com/korpusovmax/simple-ann/pull/2

    New Contributors

    • @y9neon made their first contribution in https://github.com/korpusovmax/simple-ann/pull/2

    Full Changelog: https://github.com/korpusovmax/simple-ann/commits/v1.0

    Source code(tar.gz)
    Source code(zip)
Owner
Korpusov Maxim
Korpusov Maxim
A gradle plugin for getting java lambda support in java 6, 7 and android

Gradle Retrolambda Plugin This plugin will automatically build your java or android project with retrolambda, giving you lambda goodness on java 6 or

Evan Tatarka 5.3k Jan 5, 2023
I was fed up with writing Java classes to mirror json models. So I wrote this Java app to automate the process.

Json2Java I was fed up with writing Java classes to mirror json models. So I wrote this Java app to automate the process. What this tool can do right

Jon F Hancock 303 Oct 8, 2022
ZXing ("Zebra Crossing") barcode scanning library for Java, Android

Project in Maintenance Mode Only The project is in maintenance mode, meaning, changes are driven by contributed patches. Only bug fixes and minor enha

ZXing Project 30.5k Dec 27, 2022
Google core libraries for Java

Guava: Google Core Libraries for Java Guava is a set of core Java libraries from Google that includes new collection types (such as multimap and multi

Google 46.5k Jan 1, 2023
AndroidPermissions 4.2 0.0 Java Android M was added to check Permission. but Permission check processing is so dirty.

Android Permissions Checker Android M was added to check Permission. but Permission check processing is so dirty. This Project is to be simple, Checki

Steve SeongUg Jung 340 Nov 11, 2022
A Java client for the Sixpack A/B testing framework https://github.com/seatgeek/sixpack

sixpack-java A Java client for SeatGeek's Sixpack a/b testing framework: https://github.com/seatgeek/sixpack Installing Sixpack-java is currently only

null 135 Oct 7, 2022
****. Use the native and support library variants instead - https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml.html. An android library that makes it easy to add custom fonts to edittexts and textviews

Add to your project Add this line to your dependencies in build.gradle compile 'in.workarounds.typography:typography:0.0.8' Using the views There are

Workarounds 43 Nov 6, 2021
Starter-Android-Library - Starter Android Library is an Android Project with Modular Architecture.

Starter-Android-Library - Starter Android Library is an Android Project with Modular Architecture.

OpenBytes 1 Feb 18, 2022
Multitask、MultiThread(MultiConnection)、Breakpoint-resume、High-concurrency、Simple to use、Single/NotSingle-process

FileDownloader Android multi-task file download engine. 中文文档 FileDownloader2 Now, FileDownloader2-OkDownload is released, okdownload will contain all

LAIX Inc. (formerly LingoChamp Inc.) 10.7k Jan 3, 2023
KodeEditor - A simple code editor with syntax highlighting and pinch to zoom

KodeEditor - A simple code editor with syntax highlighting and pinch to zoom

Markus Ressel 65 Oct 28, 2022