A complete and organized repository with Machine Learning and Deep Learning algorithm implementations from scratch, practical projects, and educational notebooks.
This repository is organized into three main areas:
Implementations of fundamental machine learning algorithms.
-
Regression
- Linear Regression (Gradient Descent & Normal Equation)
- Locally Weighted Linear Regression
- Softmax Regression
-
Classification
- Logistic Regression (Gradient Descent & Newton's Method)
- Naive Bayes
- Clustering
- K-Means (C++ implementation)
- K-Nearest Neighbors (KNN) - C++ implementation
Low-level C++ implementations for optimized performance.
- Basic neural network implementation
- Layers: Input, Hidden, Output
- Neurons and network architecture
Classic CNN Architectures:
- LeNet
- VGG16
- GoogLeNet (Inception)
- ResNet
- EfficientNet
Practical Projects:
- Melanoma Classification
- Skin Cancer Classification
- FP16 Optimization
OpenCV:
- Basic tutorials: filters, colors, contours, edge detection
- Projects: Color detection, Face anonymization
- Various experiments
Utilities:
- Data loaders
- Mean and standard deviation calculation
- Binary Focal Loss
- Helper functions
- Autoencoders
- Fully Connected GAN
- DCGAN (Deep Convolutional GAN)
Fundamentals:
- N-grams
- Data gathering and preprocessing
Sequence Models:
- RNN (Recurrent Neural Networks)
- RNN from Scratch
- LSTM (Long Short-Term Memory)
- Sequence-to-Sequence
- Sequence-to-Sequence with Attention
Transformers:
- Transformers from Scratch
- GPT-1 from Scratch
- Transformers for Translation
- Project: GPT trained on Wikipedia articles
Applications:
- Spam Classifier (Naive Bayes)
- Name Generator
- Datasets and metrics
- Transfer Learning
- Multi-label Classification
- Transpose Convolution
- Popularity-based recommendation system
All datasets are centralized in the data/ folder:
- images/: MNIST and other images
- tabular/: Iris.csv and other tabular datasets
Python:
pip install numpy pandas matplotlib scikit-learn
pip install torch torchvision
pip install tensorflow
pip install opencv-python
pip install nltkC++ (for native implementations):
- C++ Compiler (g++, MSVC, etc.)
- CMake (optional)
- Install Jupyter:
pip install jupyter notebook- Navigate to desired folder:
cd 2-Deep-Learning/computer_vision/architectures
jupyter notebookcd 1-Machine-Learning/cpp_implementations
g++ -std=c++17 -o program main.cpp knn.cpp kmeans.cpp data_handler.cpp
./program- Linear and Logistic Regression
- Distance-based algorithms (KNN)
- Probabilistic models (Naive Bayes)
- Clustering (K-Means)
- Fundamental CNN architectures
- Transfer Learning
- GANs and generative models
- Medical projects (skin cancer detection)
- OpenCV and image processing
- Classical language models (N-grams)
- RNNs and LSTMs
- Attention Mechanisms
- Transformers and GPT
- Practical applications
- Educational: Didactic implementations from scratch
- Practical: Real projects and applications
- Organized: Clear structure by topics and subtopics
- Complete: From fundamentals to advanced techniques
- Languages: Python, C++
- DL Frameworks: PyTorch, TensorFlow
- Computer Vision: OpenCV
- NLP: NLTK, Transformers
- Data: NumPy, Pandas
- Visualization: Matplotlib, Seaborn
Machine-Learning-Scratch/
├── data/ # Centralized datasets
│ ├── images/ # MNIST, etc.
│ └── tabular/ # CSV files
│
├── 1-Machine-Learning/ # Classical ML
│ ├── supervised/
│ │ ├── regression/ # Regression algorithms
│ │ ├── classification/ # Classification algorithms
│ │ └── examples/ # Practical examples
│ ├── unsupervised/
│ │ ├── clustering/ # K-means
│ │ └── dimensionality_reduction/ # PCA, etc.
│ ├── nearest_neighbors/ # KNN
│ └── cpp_implementations/ # C++ implementations
│
├── 2-Deep-Learning/ # Deep Learning
│ ├── fundamentals/ # Basic neural networks
│ │ └── layers/ # Layer implementations
│ ├── computer_vision/
│ │ ├── architectures/ # Classic CNNs
│ │ ├── projects/ # Practical projects
│ │ ├── opencv/ # OpenCV
│ │ └── utils/ # Utilities
│ ├── generative_models/ # GANs, Autoencoders
│ ├── nlp/
│ │ ├── fundamentals/ # N-grams, preprocessing
│ │ ├── sequence_models/ # RNN, LSTM
│ │ ├── transformers/ # Transformers, GPT
│ │ └── applications/ # Practical projects
│ └── specialized/ # Specialized techniques
│
├── 3-Recommendation-Systems/ # Recommendation systems
│
└── README.md # This file
This is a personal study repository, but suggestions and improvements are welcome!
This project is for educational purposes.
- GitHub: @MatheusLevy
Last updated: October 2025