An open API service indexing awesome lists of open source software.

https://github.com/flouthoc/perceptron

:seedling: NeuralNetwork01: Lib for Single Perceptron
https://github.com/flouthoc/perceptron

machine-learning neural-network perceptron perceptron-learning-algorithm

Last synced: 2 months ago
JSON representation

:seedling: NeuralNetwork01: Lib for Single Perceptron

Awesome Lists containing this project

README

        

# Neural Network01: PerceptRon

Implementation of simplest neuron i.e Rosenblatt Perceptron Model. Following codebase will demonstrate a perceptron of learning basic logic gates e.g AND , OR, NAND and a simple personality classifier on the bases of height and weight.

### Please read any of the examples and then dig into perceptron.h.

## Usage
```
g++ -std=c++11 -o .cpp
./
```

## Docs
#### Simple example for Boolean OR gate
```c++
#include
#include
#include "perceptron.h"

using namespace std;

int main(){

Perceptron per(2);
cout<<"---- Weights before training ----"<, bool>> trainingset{
make_pair(vector {1,0}, true),
make_pair(vector {0,1}, true),
make_pair(vector {0,0}, false)
};
per.traintilllearn(trainingset);
cout<<"---- Weights after training ----"< {1,1})< {1,0})< {0,1})< {0,0})<