Skip to content

walicard56/IA_redes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧩 Neural Networks — From Scratch

Implementation of neural networks built from scratch in pure Python — no high-level frameworks. A hands-on exploration of deep learning fundamentals.

Python NumPy Educational License


Overview

This project implements neural networks without TensorFlow or PyTorch — using only Python and NumPy. The goal is to build a deep understanding of how neural networks actually work under the hood by implementing every component manually: forward propagation, backpropagation, weight updates, and evaluation.


Learning Pipeline

The project is organized into sequential phases, each represented by a directory:

Coletas/            # 1. Data collection and loading
Pré-processamentos/ # 2. Normalization, encoding, train/test split
Modelagem/          # 3. Network architecture, forward/backprop, gradient descent
Avaliação/          # 4. Accuracy, loss curves, confusion matrix
interface/          # 5. Simple visualization interface

Concepts Implemented

  • Forward Propagation — layer-by-layer computation of activations
  • Activation Functions — Sigmoid, ReLU, Softmax (manual implementation)
  • Loss Functions — Mean Squared Error, Cross-Entropy Loss
  • Backpropagation — gradient computation via chain rule
  • Gradient Descent — weight and bias updates (SGD)
  • Data Preprocessing — normalization, one-hot encoding
  • Model Evaluation — accuracy, loss tracking per epoch

Requirements

pip install -r requirements.txt

Core dependencies: numpy, matplotlib, pandas


Installation

git clone https://github.com/walicard56/IA_redes.git
cd IA_redes
pip install -r requirements.txt

Running

Navigate to each phase directory in order:

# Step 1 — Load your dataset
cd Coletas && python collect.py

# Step 2 — Preprocess the data
cd ../Pré-processamentos && python preprocess.py

# Step 3 — Train the network
cd ../Modelagem && python model.py

# Step 4 — Evaluate results
cd ../Avaliação && python evaluate.py

Example: Manual Forward Pass

import numpy as np

def sigmoid(z):
    return 1 / (1 + np.exp(-z))

def forward(X, weights, biases):
    Z = np.dot(weights, X) + biases
    A = sigmoid(Z)
    return A

# Single layer pass
X = np.array([[0.5], [0.8]])
W = np.random.randn(3, 2)
b = np.zeros((3, 1))

output = forward(X, W, b)
print(output)

Why Build From Scratch?

"What I cannot create, I do not understand." — Richard Feynman

Using high-level frameworks hides the math. Building from scratch forces you to truly understand:

  • Why learning rate matters
  • How gradients flow backwards through layers
  • What happens when weights are initialized poorly

Author

Walisson Jose · GitHub · Portfolio

About

Neural network implementation from scratch — exploring AI fundamentals and deep learning concepts

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages