GithubHelp home page GithubHelp logo

goessl / neuralnetwork Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 3.0 17 KB

Very basic neural network implementation.

License: MIT License

Java 100.00%
java java8 java-8 machinelearning machine-learning machine-learning-algorithms artificial-intelligence ai neuralnetwork neural-network

neuralnetwork's Introduction

NeuralNetwork

Very basic neural network implementation to understand & try out machine learning. In this repository you can find two neural network classes, one without & one with biases. Both work mostly the same and support the same methods so they will referred to as the neural network. I recommend using the bias version for better results.

The neural network class is only used for construction, forward & backward propagation! To train the network sebig3000/Optimization is needed!

Usage

Construct a new neural network by calling its constructor and specifying its parameters. These include the number of inputs, the number of nodes in every layer and the activation functions of every layer & their derivatives. Common activation functions & their derivatives are already implemented in ActivationFunction. Now you can already forward datasets through the network & do back propagation.

Input and output is stored in matricies in which every row represents an dataset and every column gets feed into an node (e.g. element[1][2] is a parameter of a dataset with index [1] and gets feed into the node with index [2])

To train the network you create a new NeuralNetworkOptimizer and give it your neural network. hen call whatever optimization algorithm you like with your input & output sets and let the optimizer train the network. (Adam is recommended)

Getting Started

This repository depends on sebig3000/Matrix! So make sure you have already installed it. Then you can simply download this repository and add it to your project as a new package! Done!

Contributors

The two people who inspired me to try making my own machine learning project are Brandon Rohrer and Stephen Welch. Both make awesome YouTube videos that explain how machine learning works.

Stephen Welch:

Brandon Rohrer:

TODO

  • Fix dependencies
  • Remove optimization wrappers
  • Argument validation
  • Documentation

License (MIT)

MIT License

Copyright (c) 2019 Sebastian Gössl

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

neuralnetwork's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

neuralnetwork's Issues

It does not seem to work

It does not seem to work, it generates random output values every time you try to use...
I try to learn this simple XOR boolean operation and does not work :

// Training Data
// 0.0, 0.0, 1.0, 1.0
// 0.0, 1.0, 0.0, 1.0
XOR
// Expected results
// 0.0, 1.0, 1.0, 0.0

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.