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