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
- Host: GitHub
- URL: https://github.com/flouthoc/perceptron
- Owner: flouthoc
- Created: 2019-01-06T15:14:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-24T11:50:58.000Z (over 6 years ago)
- Last Synced: 2025-03-25T10:05:25.415Z (3 months ago)
- Topics: machine-learning, neural-network, perceptron, perceptron-learning-algorithm
- Language: C++
- Homepage:
- Size: 31.3 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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})<