Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– Machine Learning Projects

A comprehensive collection of machine learning implementations covering various algorithms and techniques. This repository serves as a practical learning resource with complete implementations, detailed documentation, and real-world datasets.

Python Scikit-Learn License


๐Ÿ“‹ Table of Contents


๐ŸŽฏ About

This repository contains hands-on implementations of various machine learning algorithms, demonstrating:

  • โœ… Complete data preprocessing pipelines
  • โœ… Feature engineering techniques
  • โœ… Model training and evaluation
  • โœ… Visualization and analysis
  • โœ… Best practices in ML workflow
  • โœ… Real-world datasets and use cases

Each implementation is organized in its own folder with dedicated documentation, making it easy to understand and learn from individual projects.


๐ŸŽ“ What's Covered

This repository spans the full spectrum of machine learning:

๐Ÿ“Š Classical Machine Learning

  • Supervised Learning: Linear/Logistic Regression, KNN, SVM
  • Unsupervised Learning: K-Means Clustering
  • Feature Engineering: HOG, PCA, StandardScaler

๐Ÿง  Deep Learning

  • Fundamentals: Artificial Neural Networks (ANN)
  • Computer Vision: Convolutional Neural Networks (CNN)
  • Sequence Processing: RNN, BiRNN, LSTM
  • Applications: Image Classification, Sentiment Analysis

๐ŸŽฏ Real-World Applications

  • Car Price Prediction
  • Heart Disease Classification
  • Customer Segmentation
  • Image Classification (Dogs vs Cats)
  • Sentiment Analysis (Movie Reviews)
  • Handwritten Digit Recognition

๐Ÿ“š Implementations

1๏ธโƒฃ Linear Regression

๐Ÿ“ Implementation/LinearRegression

A comprehensive car price prediction project demonstrating various regression techniques for predicting continuous values.

Topics Covered:

  • Linear Regression (OLS)
  • Ridge Regression (L2 Regularization)
  • Lasso Regression (L1 Regularization)
  • ElasticNet (L1 + L2)
  • Feature Engineering
  • Data Preprocessing
  • Model Evaluation

Dataset: Car Details from CarDekho Type: Regression (Continuous Prediction) Status: โœ… Complete

๐Ÿ“– View Full Documentation โ†’


2๏ธโƒฃ Logistic Regression

๐Ÿ“ Implementation/LogisticRegression

A comprehensive heart disease prediction project demonstrating classification techniques for binary prediction.

Topics Covered:

  • Logistic Regression (Basic)
  • L2 Regularization (Ridge)
  • L1 Regularization (Lasso)
  • Classification Metrics (Accuracy, Precision, Recall, F1, ROC-AUC)
  • Confusion Matrix Analysis
  • Cross-Validation
  • Hyperparameter Tuning
  • Detailed comparison with Linear Regression

Dataset: Heart Disease UCI Dataset Type: Classification (Binary Prediction) Status: โœ… Complete

๐Ÿ“– View Full Documentation โ†’


3๏ธโƒฃ K-Nearest Neighbors (KNN)

๐Ÿ“ Implementation/KNN

A comprehensive iris flower classification project demonstrating K-Nearest Neighbors algorithm for multi-class classification.

Topics Covered:

  • KNN Algorithm (instance-based learning)
  • Distance Metrics (Euclidean, Manhattan, Minkowski)
  • K Value Optimization
  • Multi-class Classification
  • Weighted vs Uniform Voting
  • Cross-Validation

Dataset: Iris Flower Dataset (UCI ML Repository) Type: Classification (Multi-class) Status: โœ… Complete

๐Ÿ“– View Full Documentation โ†’


4๏ธโƒฃ Support Vector Machines (SVM)

๐Ÿ“ Implementation/SVM

Support Vector Machine implementations for various classification tasks.

Topics Covered:

  • Linear SVM
  • RBF Kernel SVM
  • Polynomial Kernel SVM
  • GPU-accelerated SVM
  • Hyperparameter tuning

Dataset: Various classification datasets Type: Classification Status: โœ… Complete

๐Ÿ“– View Full Documentation โ†’


5๏ธโƒฃ K-Means Clustering

๐Ÿ“ Implementation/KMeansClustering

A comprehensive unsupervised learning project demonstrating K-Means Clustering with Elbow Method for customer segmentation.

Topics Covered:

  • K-Means Clustering Algorithm
  • Elbow Method for Optimal K Selection
  • Silhouette Score Analysis
  • Davies-Bouldin Index
  • Calinski-Harabasz Score
  • Customer Segmentation
  • Cluster Profiling and Business Insights
  • 2D and 3D Cluster Visualization

Dataset: Mall Customers Dataset Type: Unsupervised Learning (Clustering) Status: โœ… Complete

๐Ÿ“– View Full Documentation โ†’


6๏ธโƒฃ SVM Image Classification (Dog vs Cat)

๐Ÿ“ Implementation/SVM_ImageClassification

A comprehensive comparison of feature extraction techniques for image classification using SVM.

Topics Covered:

  • HOG (Histogram of Oriented Gradients) Feature Extraction
  • PCA (Principal Component Analysis) Dimensionality Reduction
  • Linear, RBF, and Polynomial SVM Kernels
  • 8+ Evaluation Metrics
  • Image Preprocessing Pipeline
  • Detailed Feature Engineering Analysis

Dataset: Microsoft Dogs vs Cats (25,000 images) Type: Binary Image Classification Status: โœ… Complete

๐Ÿ“– View Full Documentation โ†’


๐Ÿง  Deep Learning Implementations

7๏ธโƒฃ Artificial Neural Networks (ANN)

๐Ÿ“ Implementation/ANN

Foundation of deep learning - fully connected neural networks for tabular data.

Topics Covered:

  • Sequential Model Architecture
  • Dense (Fully Connected) Layers
  • ReLU and Sigmoid Activation Functions
  • Dropout Regularization
  • Adam Optimizer
  • Early Stopping
  • Binary Classification

Architecture: 3 Hidden Layers (64โ†’32โ†’16 neurons) Type: Binary Classification Status: โœ… Complete

๐Ÿ“– View Full Documentation โ†’


8๏ธโƒฃ Convolutional Neural Networks (CNN)

๐Ÿ“ Implementation/CNN

State-of-the-art architecture for image classification and computer vision tasks.

Topics Covered:

  • Convolutional Layers (Feature Extraction)
  • Pooling Layers (Dimensionality Reduction)
  • Batch Normalization
  • Data Augmentation
  • Transfer Learning Concepts
  • Filter Visualization

Dataset: MNIST (70,000 handwritten digits) Architecture: 4 Conv Layers + 2 Dense Layers Type: Multi-class Image Classification Status: โœ… Complete

๐Ÿ“– View Full Documentation โ†’


9๏ธโƒฃ Recurrent Neural Networks (RNN)

๐Ÿ“ Implementation/RNN

Sequential data processing for sentiment analysis and text classification.

Topics Covered:

  • SimpleRNN Layers
  • Embedding Layers
  • Text Tokenization and Padding
  • Sentiment Analysis
  • Backpropagation Through Time (BPTT)
  • Sequence Processing

Dataset: IMDB Movie Reviews (50,000 reviews) Architecture: Embedding โ†’ 2 RNN Layers โ†’ Dense Type: Binary Sentiment Classification Status: โœ… Complete

๐Ÿ“– View Full Documentation โ†’


๐Ÿ”Ÿ Bidirectional RNN (BiRNN)

๐Ÿ“ Implementation/BiRNN

Enhanced RNN that processes sequences in both forward and backward directions for better context understanding.

Topics Covered:

  • Bidirectional Processing
  • Forward and Backward RNN
  • Context from Both Directions
  • Improved Accuracy

Type: Sequence Classification Status: โœ… Complete

๐Ÿ“– View Full Documentation โ†’


1๏ธโƒฃ1๏ธโƒฃ Long Short-Term Memory (LSTM)

๐Ÿ“ Implementation/LSTM

Advanced RNN variant that solves the vanishing gradient problem for long sequences.

Topics Covered:

  • LSTM Gates (Input, Forget, Output)
  • Long-term Dependencies
  • Cell State Management

Type: Sequence Processing Status: ๐Ÿšง In Progress


๐Ÿ”ฎ Coming Soon

More implementations will be added:

  • BiLSTM (Bidirectional LSTM)
  • GRU (Gated Recurrent Units)
  • Decision Trees
  • Random Forest
  • Gradient Boosting (XGBoost, LightGBM)
  • Naive Bayes
  • Hierarchical Clustering
  • DBSCAN Clustering
  • Time Series Analysis
  • Transformer Models
  • GANs (Generative Adversarial Networks)

๐Ÿ“‚ Project Structure

MachineLearning/
โ”‚
โ”œโ”€โ”€ dataset/                                    # Shared datasets
โ”‚   โ”œโ”€โ”€ CAR DETAILS FROM CAR DEKHO.csv          # Car price dataset
โ”‚   โ”œโ”€โ”€ heart.csv                               # Heart disease dataset
โ”‚   โ”œโ”€โ”€ Mall_Customers.csv                      # Mall customers dataset (optional)
โ”‚   โ””โ”€โ”€ PetImages/                              # Dogs vs Cats images (25k+ images)
โ”‚
โ”œโ”€โ”€ Implementation/                             # All implementations
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ LinearRegression/                       # ๐Ÿ“Š Regression
โ”‚   โ”‚   โ”œโ”€โ”€ LinearRegression.ipynb
โ”‚   โ”‚   โ”œโ”€โ”€ README.md
โ”‚   โ”‚   โ””โ”€โ”€ Notes.md
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ LogisticRegression/                     # ๐Ÿ“Š Classification
โ”‚   โ”‚   โ”œโ”€โ”€ LogisticRegression.ipynb
โ”‚   โ”‚   โ”œโ”€โ”€ README.md
โ”‚   โ”‚   โ””โ”€โ”€ DATASET_INSTRUCTIONS.md
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ KNN/                                    # ๐Ÿ“Š Classification
โ”‚   โ”‚   โ”œโ”€โ”€ KNN.ipynb
โ”‚   โ”‚   โ”œโ”€โ”€ README.md
โ”‚   โ”‚   โ””โ”€โ”€ DATASET_INSTRUCTIONS.md
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ SVM/                                    # ๐Ÿ“Š Classification
โ”‚   โ”‚   โ”œโ”€โ”€ SVM.ipynb
โ”‚   โ”‚   โ”œโ”€โ”€ README.md
โ”‚   โ”‚   โ”œโ”€โ”€ DATASET_INSTRUCTIONS.md
โ”‚   โ”‚   โ”œโ”€โ”€ GPU_SVM_Example.py
โ”‚   โ”‚   โ””โ”€โ”€ GPU_Image_SVM_Example.py
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ KMeansClustering/                       # ๐ŸŽฏ Clustering
โ”‚   โ”‚   โ”œโ”€โ”€ KMeansClustering.ipynb
โ”‚   โ”‚   โ”œโ”€โ”€ kmeans_script.py
โ”‚   โ”‚   โ”œโ”€โ”€ README.md
โ”‚   โ”‚   โ””โ”€โ”€ DATASET_INSTRUCTIONS.md
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ SVM_ImageClassification/                # ๐Ÿ–ผ๏ธ Image Classification
โ”‚   โ”‚   โ”œโ”€โ”€ SVM_DogVsCat.ipynb
โ”‚   โ”‚   โ””โ”€โ”€ README.md (1200+ lines)
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ANN/                                    # ๐Ÿง  Deep Learning
โ”‚   โ”‚   โ”œโ”€โ”€ ANN.ipynb
โ”‚   โ”‚   โ””โ”€โ”€ README.md
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ CNN/                                    # ๐Ÿง  Deep Learning
โ”‚   โ”‚   โ”œโ”€โ”€ CNN.ipynb
โ”‚   โ”‚   โ””โ”€โ”€ README.md
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ RNN/                                    # ๐Ÿง  Deep Learning
โ”‚   โ”‚   โ”œโ”€โ”€ RNN.ipynb
โ”‚   โ”‚   โ””โ”€โ”€ README.md
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ BiRNN/                                  # ๐Ÿง  Deep Learning
โ”‚   โ”‚   โ”œโ”€โ”€ BiRNN.ipynb
โ”‚   โ”‚   โ””โ”€โ”€ README.md
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ LSTM/                                   # ๐Ÿง  Deep Learning
โ”‚       โ””โ”€โ”€ LSTM.ipynb
โ”‚
โ”œโ”€โ”€ README.md                                   # This file
โ””โ”€โ”€ requirements.txt                            # Python dependencies

๐Ÿš€ Getting Started

Prerequisites

Python 3.8 or higher
pip (Python package manager)
Jupyter Notebook or JupyterLab

Installation

  1. Clone the repository

    git clone <your-repository-url>
    cd MachineLearning
  2. Create virtual environment (Recommended)

    python -m venv venv
    
    # On macOS/Linux:
    source venv/bin/activate
    
    # On Windows:
    venv\Scripts\activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Start Jupyter Notebook

    jupyter notebook
  5. Navigate to any implementation

    • Go to Implementation/[Algorithm]/
    • Open the .ipynb file
    • Run cells sequentially

๐Ÿ“ Datasets

All datasets used in this repository are stored in the dataset/ folder:

Dataset Used In Size Description
CAR DETAILS FROM CAR DEKHO.csv Linear Regression ~4,340 records Used car pricing data with features like year, km_driven, fuel type, etc.
heart.csv Logistic Regression ~300 records Heart disease UCI dataset with 13 clinical attributes for binary classification

๐Ÿ’ป Quick Start

Running an Implementation

Linear Regression (Continuous Prediction):

cd Implementation/LinearRegression
jupyter notebook LinearRegression.ipynb

Logistic Regression (Binary Classification):

cd Implementation/LogisticRegression
jupyter notebook LogisticRegression.ipynb

Using Virtual Environment

Each implementation can be run independently using the shared requirements.txt:

# Install all dependencies
pip install -r requirements.txt

# Or install specific packages
pip install numpy pandas matplotlib seaborn scikit-learn scipy jupyter

๐Ÿ“š Learning Resources

Each implementation folder contains:

  • ๐Ÿ““ Jupyter Notebook: Complete code with explanations
  • ๐Ÿ“– README.md: Detailed documentation with theory
  • ๐ŸŽฅ Video Links: Recommended YouTube tutorials
  • ๐Ÿ“ Articles: Helpful blog posts and documentation
  • ๐Ÿ’ก Best Practices: When and how to use each technique

๐Ÿ› ๏ธ Technologies Used

Classical Machine Learning:

  • Python: Primary programming language
  • NumPy: Numerical computing and array operations
  • Pandas: Data manipulation and analysis
  • Matplotlib & Seaborn: Data visualization and plotting
  • Scikit-Learn: Classical ML algorithms and tools
  • SciPy: Scientific computing
  • Scikit-Image: Image processing (HOG, filters)
  • OpenCV: Computer vision operations

Deep Learning:

  • TensorFlow: Deep learning framework
  • Keras: High-level neural networks API
  • GPU Support: CUDA acceleration for training

Development Tools:

  • Jupyter: Interactive notebooks for experimentation
  • Git: Version control

๐Ÿค Contributing

Contributions are welcome! Here's how you can help:

  1. Add new implementations

    • Create a new folder in Implementation/
    • Add notebook with complete code
    • Include comprehensive README
    • Follow existing structure
  2. Improve existing implementations

    • Enhance visualizations
    • Add more techniques
    • Improve documentation
    • Fix bugs or issues
  3. Submit Pull Request

    git checkout -b feature/NewImplementation
    git commit -m 'Add new implementation'
    git push origin feature/NewImplementation

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments

  • Datasets: Various open-source datasets from Kaggle and other platforms
  • Libraries: Scikit-Learn, Pandas, NumPy, Matplotlib, Seaborn
  • Community: Stack Overflow, Towards Data Science, and the ML community
  • Inspiration: Various tutorials, courses, and research papers

๐Ÿ“ž Contact

Project Maintainer: Pravin Kumar S


๐ŸŽฏ Learning Path

For Beginners - Classical ML:

1. Start: Linear Regression (supervised learning basics)
         โ†“
2. Classification: Logistic Regression
         โ†“
3. Advanced: KNN, SVM (distance & kernel methods)
         โ†“
4. Unsupervised: K-Means Clustering
         โ†“
5. Practice: Apply to your own datasets

For Deep Learning:

1. Foundation: ANN (neural network basics)
         โ†“
2. Computer Vision: CNN (image classification)
         โ†“
3. Sequences: RNN (text & time series)
         โ†“
4. Advanced: BiRNN, LSTM (long-term dependencies)
         โ†“
5. Projects: Build your own deep learning models

Complete Journey:

Classical ML โ†’ Feature Engineering โ†’ Deep Learning โ†’ Production

๐Ÿ“ˆ Repository Stats

  • Total Implementations: 11 (and growing!)
  • Total Notebooks: 11+
  • Lines of Code: 15,000+
  • Documentation Pages: 6,000+
  • Algorithms Covered:
    • Classical ML: Regression, Classification, Clustering
    • Deep Learning: ANN, CNN, RNN, BiRNN, LSTM
    • Computer Vision: Image Classification with SVM, CNN
    • NLP: Sentiment Analysis with RNN

โญ If you find this repository helpful, please give it a star! โญ

Happy Learning! ๐Ÿš€


Made with โค๏ธ by Pravin Kumar S

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages