https://github.com/geo-tp/simple-neural-network
Neural network implementation for learning purpose
https://github.com/geo-tp/simple-neural-network
gradient-descent learning neural-network
Last synced: 4 months ago
JSON representation
Neural network implementation for learning purpose
- Host: GitHub
- URL: https://github.com/geo-tp/simple-neural-network
- Owner: geo-tp
- Created: 2023-01-22T14:57:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-22T17:52:56.000Z (over 2 years ago)
- Last Synced: 2025-01-11T01:44:10.751Z (6 months ago)
- Topics: gradient-descent, learning, neural-network
- Language: Python
- Homepage:
- Size: 36.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Simple Neural Network
===================Neural network implementation for learning purpose
- Including :
- Neural activation
- Loss calculating
- Forward activation propagation
- Backward adjustement propagation
- PredictionsSingle Layer Model
---------------A neuron on a layer to be able to understand the general functioning of a neural network.

```
X_train, y_train = Datasets.get_random_blobs_set(n_samples=10000)
X_test, y_test = Datasets.get_random_blobs_set(n_samples=200)model = SingleLayerNeuralModel(X_train, y_train)
model.start_training(iteration=2000, learning_rate=0.05)
model.show_training_results()
preds = model.predict(X_test)
```Multi Layer Model
--------------Neural network on several layers to improve the accuracy of the predictions and general abilities of the model.

```
X_train, y_train = Datasets.get_random_circles_set(n_samples=1000)
X_test, y_test = Datasets.get_random_circles_set(n_samples=200)# hidden_layers determinates the number of layers and neurons
model = MultiLayerNeuralModel(X_train, y_train, hidden_layers=(16, 16, 16))
model.start_training(iteration=10000, learning_rate=0.05)
model.show_training_results()
preds = model.predict(X_test)
```Install Requirements
----------Created with python 3.10.6
```
python -m pip install -r requirements.txt
```