Skip to content

Machine Learning Mastery (MLM-101): A ten-phase practical course (handouts + code) covering theory, applications, model types & building real systems.

License

Notifications You must be signed in to change notification settings

flowdiary/MLM-101

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

31 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Machine Learning Mastery (MLM-101)

License Python Level Maintained

A comprehensive, hands-on machine learning course from fundamentals to production deployment.
Master Python, NumPy, Pandas, Scikit-learn, Deep Learning, NLP, and model deployment with real-world projects.


πŸ“š Table of Contents


🧠 About

Machine Learning Mastery (MLM-101) is a complete educational program designed to take learners from absolute beginners to proficient machine learning practitioners. This repository contains all course materials including:

  • πŸ“˜ 85+ Lecture Materials covering ML theory, Python, NumPy, Pandas, Scikit-learn, Deep Learning, NLP, and Deployment
  • πŸ’» Hands-on Notebooks with code examples and interactive labs
  • πŸš€ Real-World Projects including Sales Forecasting, Fraud Detection, and Course Recommendation systems
  • 🌐 Deployment Guides for Streamlit, FastAPI, Gradio, and Docker
  • πŸ“Š Datasets for practical exercises

Course Website: https://flowdiary.ai/course/MLM-101

✨ What's New (November 2025)

  • βœ… 12 New Foundation Notebooks covering Python, NumPy, Pandas, Matplotlib, and Scikit-Learn
  • βœ… 100% Coverage for all foundation topics (Lectures 7-46)
  • βœ… Comprehensive Learning Paths for beginners to advanced learners
  • βœ… 35+ Hands-on Notebooks with ML examples and practice exercises
  • βœ… Complete Project Suite with deployment examples

🎯 Learning Outcomes

By completing this course, you will be able to:

βœ… Understand fundamental ML concepts (supervised, unsupervised, deep learning)
βœ… Master Python programming for data science and ML
βœ… Manipulate and analyze data using NumPy and Pandas
βœ… Visualize data effectively with Matplotlib
βœ… Build, train, and evaluate ML models with Scikit-learn
βœ… Develop deep learning models (CNNs, FFNNs) with Keras/TensorFlow
βœ… Implement NLP solutions including sentiment analysis and NER
βœ… Build RAG (Retrieval-Augmented Generation) systems with LangChain
βœ… Deploy ML models to production using Streamlit, FastAPI, and Docker
βœ… Apply ML to real-world problems through guided projects


πŸ“‹ Prerequisites

Required Knowledge

  • Basic programming concepts (variables, loops, functions)
  • High school level mathematics (algebra, basic statistics)
  • Familiarity with command-line interfaces (recommended)

Software Requirements

  • Python 3.8 or higher (Download Python)
  • Jupyter Notebook or JupyterLab (or VS Code with Jupyter extension)
  • Git (Download Git)
  • Text Editor/IDE: VS Code, PyCharm, or Jupyter Notebook
  • 8GB+ RAM recommended for deep learning notebooks

Optional


πŸš€ Installation

Quick Start

  1. Clone the repository:

    git clone https://github.com/flowdiary/MLM-101.git
    cd MLM-101
  2. Install dependencies:

    pip install -r requirements.txt
  3. Launch Jupyter Notebook:

    jupyter notebook
  4. Open a notebook and start learning!


Using Virtual Environment

Recommended for isolating project dependencies.

On macOS/Linux:

# Navigate to project directory
cd MLM-101

# Create virtual environment
python3 -m venv venv

# Activate virtual environment
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Launch Jupyter
jupyter notebook

On Windows:

# Navigate to project directory
cd MLM-101

# Create virtual environment
python -m venv venv

# Activate virtual environment
venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Launch Jupyter
jupyter notebook

To deactivate:

deactivate

Using Conda

Recommended for data science workflows.

# Create conda environment
conda create -n mlm101 python=3.10 -y

# Activate environment
conda activate mlm101

# Install dependencies
pip install -r requirements.txt

# Or use conda for main packages
conda install numpy pandas matplotlib scikit-learn jupyter -y
pip install streamlit tensorflow langchain

# Launch Jupyter
jupyter notebook

To deactivate:

conda deactivate

πŸ“‚ Repository Structure

MLM-101/
β”œβ”€β”€ docs/                      # Course handouts, slides, and guides
β”‚   β”œβ”€β”€ handouts/             # PDF lecture materials
β”‚   └── guides/               # Installation & troubleshooting guides
β”‚
β”œβ”€β”€ notebooks/                 # Jupyter notebooks organized by topic
β”‚   β”œβ”€β”€ 01_basics/            # ML fundamentals
β”‚   β”œβ”€β”€ 02_deep_learning/     # Neural networks, CNNs
β”‚   β”œβ”€β”€ 03_nlp/               # NLP and text processing
β”‚   β”œβ”€β”€ 04_rag/               # RAG systems
β”‚   └── 05_deployment/        # Model deployment
β”‚
β”œβ”€β”€ projects/                  # Real-world ML projects
β”‚   β”œβ”€β”€ 01_sales_forecasting/
β”‚   β”œβ”€β”€ 02_fraud_detection/
β”‚   └── 03_course_recommendation/
β”‚
β”œβ”€β”€ scripts/                   # Python scripts (converted notebooks)
β”‚   β”œβ”€β”€ deployment/
β”‚   └── data/
β”‚
β”œβ”€β”€ apps/                      # Deployment applications
β”‚   β”œβ”€β”€ fastapi_app/          # REST API
β”‚   β”œβ”€β”€ gradio_app/           # RAG UI
β”‚   └── streamlit_app/        # Interactive frontend
β”‚
β”œβ”€β”€ data/                      # Dataset storage (see data/README.md)
β”œβ”€β”€ models/                    # Saved model storage
β”œβ”€β”€ docker/                    # Docker configurations
β”œβ”€β”€ tests/                     # Unit tests
β”‚
β”œβ”€β”€ requirements.txt           # Python dependencies
β”œβ”€β”€ LICENSE                    # Apache 2.0 License
└── README.md                  # This file

πŸ“– Course Content

Phase 1: Machine Learning Theory

Introduction to ML, AI vs ML vs DL, Neural Networks, Algorithm Types, ML System Building

Phase 2: Python Programming for ML

Variables, Data Types, Control Flow, Loops, Data Structures (Lists, Tuples, Sets, Dicts), Functions, OOP, Modules

Phase 3: NumPy for Data Computing

Arrays, Mathematical Operations, Matrices, Linear Algebra, Random & Probability

Phase 4: Pandas for Data Analysis

DataFrames, CSV/JSON I/O, Data Cleaning, Engineering, Analysis

Phase 5: Data Visualization with Matplotlib

Plots, Customization, Sales Visualization, Exporting

Phase 6: Machine Learning with Scikit-Learn

Datasets, Model Training, Preprocessing, Encoding, Scaling, Algorithms (Regression, Classification), Evaluation, Ensembles, Hyperparameter Tuning

Phase 7: Deep Learning

Feedforward Neural Networks (FFNN), Backpropagation, Activation Functions

Phase 8: Natural Language Processing (NLP)

Text Preprocessing, Sentiment Analysis, Named Entity Recognition (NER), Sequence Models

Phase 9: Convolutional Neural Networks (CNN)

CNN Architecture, Padding, Pooling, Image Classification, Transfer Learning (ResNet50, VGG16)

Phase 10: RAG (Retrieval-Augmented Generation)

RAG Systems, LangChain, Pinecone, ChromaDB

Phase 11: Deployment

Model Serialization, FastAPI, Streamlit, Docker, Cloud Hosting

Total: 85 Lectures


οΏ½ Interactive Notebooks

Complete Notebook Collection (35+ Notebooks)

All notebooks are production-ready with executable code, ML examples, and practice exercises.

01_basics/ - Foundation & Preprocessing (14 notebooks)

Python Programming Fundamentals:

  1. πŸ“˜ python_basics.ipynb - Variables, data types, operators, conditionals
  2. πŸ“˜ python_control_flow.ipynb - Loops, iterations, list comprehensions
  3. πŸ“˜ python_data_structures.ipynb - Lists, tuples, sets, dictionaries
  4. πŸ“˜ python_functions_oop.ipynb - Functions, lambda, classes, inheritance

NumPy for Numerical Computing: 5. πŸ”’ numpy_arrays_basics.ipynb - Arrays, operations, indexing, broadcasting 6. πŸ”’ numpy_linear_algebra.ipynb - Matrix operations, eigenvalues, PCA

Pandas for Data Manipulation: 7. πŸ“Š pandas_dataframes_basics.ipynb - DataFrames, Series, reading data 8. πŸ“Š pandas_data_cleaning.ipynb - Missing values, duplicates, outliers 9. πŸ“Š pandas_data_analysis.ipynb - GroupBy, pivot tables, merging

Matplotlib for Visualization: 10. πŸ“ˆ matplotlib_plotting_basics.ipynb - Line, scatter, bar, histograms 11. πŸ“ˆ matplotlib_customization.ipynb - Colors, labels, annotations, styles

Scikit-Learn Preprocessing: 12. πŸ”§ sklearn_preprocessing.ipynb - Scaling, encoding, pipelines, train/test split

ML Evaluation & Tuning: 13. πŸ“ accuracy_metrics.ipynb - Metrics, confusion matrix, ROC curves 14. βš™οΈ hyperparameter_tuning.ipynb - Grid search, random search, cross-validation

02_deep_learning/ - Neural Networks (5 notebooks)

  1. 🧠 ffnn_classification.ipynb - Feedforward neural networks for classification
  2. 🧠 deep_learning_lectures.ipynb - Deep learning fundamentals
  3. πŸ–ΌοΈ cnn_image_classification.ipynb - CNN architecture and image classification
  4. πŸ”„ transfer_learning_resnet50.ipynb - Transfer learning with ResNet50
  5. πŸ”„ transfer_learning_vgg16.ipynb - Transfer learning with VGG16

03_nlp/ - Natural Language Processing (6 notebooks)

  1. πŸ“ nlp_introduction.ipynb - NLP fundamentals and concepts
  2. πŸ”€ nlp_preprocessing.ipynb - Tokenization, stemming, lemmatization
  3. πŸ’¬ sentiment_analysis_scikit.ipynb - Sentiment classification with Scikit-learn
  4. 🏷️ named_entity_recognition.ipynb - NER with spaCy/NLTK
  5. πŸ” sequence_models_nlp.ipynb - RNNs, LSTMs for text
  6. πŸ“š text_representation_techniques.ipynb - Bag-of-words, TF-IDF, embeddings

04_rag/ - Retrieval-Augmented Generation (2 notebooks)

  1. πŸ€– rag_langchain_book_pdf.ipynb - RAG with PDF documents
  2. πŸ—„οΈ rag_langchain_pinecone_chromadb.ipynb - Vector databases integration

05_deployment/ - Model Deployment (6 notebooks)

  1. πŸ’Ύ 01_model_serialization.ipynb - Pickle, joblib, model saving
  2. 🌐 02_serving_fastapi.ipynb - REST API with FastAPI
  3. 🎨 03_rag_langchain_gradio.ipynb - RAG UI with Gradio
  4. 🐳 04_docker_and_containerization.ipynb - Docker for ML apps
  5. ⚑ 05_real_time_inference.ipynb - Real-time predictions
  6. 🎯 06_hands_on_lab_deploy_sentiment_or_cnn.ipynb - Deployment lab

πŸŽ“ Learning Paths

🌱 Beginner Path (4-6 weeks)

Week 1-2: Python & NumPy Foundations

python_basics.ipynb
β†’ python_control_flow.ipynb
β†’ python_data_structures.ipynb
β†’ python_functions_oop.ipynb
β†’ numpy_arrays_basics.ipynb
β†’ numpy_linear_algebra.ipynb

Week 3: Data Manipulation

pandas_dataframes_basics.ipynb
β†’ pandas_data_cleaning.ipynb
β†’ pandas_data_analysis.ipynb

Week 4: Data Visualization

matplotlib_plotting_basics.ipynb
β†’ matplotlib_customization.ipynb

Week 5-6: First ML Project

sklearn_preprocessing.ipynb
β†’ accuracy_metrics.ipynb
β†’ projects/01_sales_forecasting/

πŸš€ Intermediate Path (6-8 weeks)

Prerequisites: Complete Beginner Path

Week 1-2: Advanced Scikit-Learn

hyperparameter_tuning.ipynb
β†’ Build classification models
β†’ projects/02_fraud_detection/

Week 3-4: Deep Learning Basics

deep_learning_lectures.ipynb
β†’ ffnn_classification.ipynb
β†’ cnn_image_classification.ipynb

Week 5-6: Transfer Learning

transfer_learning_resnet50.ipynb
β†’ transfer_learning_vgg16.ipynb
β†’ Custom image classification project

Week 7-8: NLP Fundamentals

nlp_introduction.ipynb
β†’ nlp_preprocessing.ipynb
β†’ sentiment_analysis_scikit.ipynb
β†’ named_entity_recognition.ipynb

πŸ”₯ Advanced Path (6-8 weeks)

Prerequisites: Complete Intermediate Path

Week 1-2: Advanced NLP

text_representation_techniques.ipynb
β†’ sequence_models_nlp.ipynb
β†’ Build custom NLP pipeline

Week 3-4: RAG Systems

rag_langchain_book_pdf.ipynb
β†’ rag_langchain_pinecone_chromadb.ipynb
β†’ projects/03_course_recommendation/

Week 5-6: Model Deployment

01_model_serialization.ipynb
β†’ 02_serving_fastapi.ipynb
β†’ 03_rag_langchain_gradio.ipynb
β†’ 04_docker_and_containerization.ipynb

Week 7-8: Production ML

05_real_time_inference.ipynb
β†’ 06_hands_on_lab_deploy_sentiment_or_cnn.ipynb
β†’ Deploy your own ML app

πŸ“Š Project-Based Path (12 weeks)

Focus on completing all three major projects with supporting notebooks:

Weeks 1-4: Sales Forecasting

  • Foundation notebooks (Python, NumPy, Pandas, Matplotlib)
  • Scikit-learn preprocessing
  • Complete projects/01_sales_forecasting/
  • Deploy with Streamlit

Weeks 5-8: Fraud Detection

  • Deep learning notebooks
  • Imbalanced data handling
  • Complete projects/02_fraud_detection/
  • Create FastAPI endpoint

Weeks 9-12: Course Recommendation

  • NLP notebooks
  • RAG system setup
  • Complete projects/03_course_recommendation/
  • Full stack deployment with Docker

🎯 Quick Start Guide by Goal

Goal: "I want to learn Python for ML"

Start here:

  1. python_basics.ipynb
  2. python_control_flow.ipynb
  3. python_data_structures.ipynb
  4. python_functions_oop.ipynb

Goal: "I want to analyze data"

Prerequisites: Python basics
Start here:

  1. numpy_arrays_basics.ipynb
  2. pandas_dataframes_basics.ipynb
  3. pandas_data_cleaning.ipynb
  4. pandas_data_analysis.ipynb
  5. matplotlib_plotting_basics.ipynb

Goal: "I want to build ML models"

Prerequisites: Python + Data analysis
Start here:

  1. sklearn_preprocessing.ipynb
  2. accuracy_metrics.ipynb
  3. hyperparameter_tuning.ipynb
  4. projects/01_sales_forecasting/

Goal: "I want to work with images"

Prerequisites: Python + ML basics
Start here:

  1. deep_learning_lectures.ipynb
  2. cnn_image_classification.ipynb
  3. transfer_learning_resnet50.ipynb
  4. transfer_learning_vgg16.ipynb

Goal: "I want to work with text/NLP"

Prerequisites: Python + ML basics
Start here:

  1. nlp_introduction.ipynb
  2. nlp_preprocessing.ipynb
  3. sentiment_analysis_scikit.ipynb
  4. named_entity_recognition.ipynb
  5. text_representation_techniques.ipynb

Goal: "I want to deploy ML models"

Prerequisites: ML models built
Start here:

  1. 01_model_serialization.ipynb
  2. 02_serving_fastapi.ipynb
  3. 03_rag_langchain_gradio.ipynb
  4. 04_docker_and_containerization.ipynb

οΏ½πŸ› οΈ How to Use This Repository

1. Running Jupyter Notebooks

# Activate your environment (venv or conda)
source venv/bin/activate  # or: conda activate mlm101

# Navigate to notebooks directory
cd notebooks

# Launch Jupyter
jupyter notebook

# Or use JupyterLab
jupyter lab

Tip: Notebooks are organized by topic. Start with 01_basics/ if you're new to ML.

πŸ“– Notebook Navigation Tips

Each notebook includes:

  • πŸ“š Learning Objectives - What you'll learn
  • πŸ’» Executable Code - Run cells to see results
  • 🎯 ML Examples - Real-world use cases
  • ✏️ Practice Exercises - Test your knowledge
  • πŸ“ Solutions - Complete exercise solutions
  • πŸ”— Next Steps - Suggested follow-up notebooks

How to navigate:

# In Jupyter Notebook/Lab:
# - Shift + Enter: Run cell and move to next
# - Ctrl/Cmd + Enter: Run cell
# - B: Create new cell below
# - A: Create new cell above
# - M: Convert to Markdown
# - Y: Convert to Code

Recommended workflow:

  1. Read the learning objectives
  2. Run each code cell in order
  3. Modify examples to experiment
  4. Complete practice exercises
  5. Check solutions
  6. Move to the next notebook in the learning path

2. Running Projects

Each project has its own directory with a README, code, and data.

Example: Sales Forecasting Project

# Navigate to project
cd projects/01_sales_forecasting

# Install project-specific dependencies (if any)
pip install -r requirements.txt

# Run the training script
python sales_forecasting.py

# Or run the Streamlit app
streamlit run sales_app.py

3. Running Deployment Apps

FastAPI Example:

cd apps/fastapi_app
pip install -r requirements.txt
uvicorn app:app --reload
# Visit: http://127.0.0.1:8000/docs

Streamlit Example:

cd apps/streamlit_app
pip install -r requirements.txt
streamlit run app.py

Gradio Example:

cd apps/gradio_app
pip install -r requirements.txt
python app.py

πŸ“‹ Notebook Completion Checklist

Track your progress through the course:

Foundation (14 notebooks) - Est. 20-30 hours:

  • Python Basics (4 notebooks)
  • NumPy (2 notebooks)
  • Pandas (3 notebooks)
  • Matplotlib (2 notebooks)
  • Scikit-Learn Preprocessing (1 notebook)
  • ML Metrics & Tuning (2 notebooks)

Deep Learning (5 notebooks) - Est. 10-15 hours:

  • FFNN & Deep Learning Fundamentals
  • CNN Image Classification
  • Transfer Learning (ResNet50, VGG16)

NLP (6 notebooks) - Est. 12-18 hours:

  • NLP Introduction & Preprocessing
  • Sentiment Analysis
  • Named Entity Recognition
  • Text Representation & Sequence Models

Advanced Topics (8 notebooks) - Est. 12-15 hours:

  • RAG Systems (2 notebooks)
  • Model Deployment (6 notebooks)

Projects (3 projects) - Est. 20-30 hours:

  • Sales Forecasting
  • Fraud Detection
  • Course Recommendation

Total Estimated Time: 70-110 hours (self-paced)


πŸ“Š Datasets

All datasets are located in project-specific data/ folders. Some datasets are included; others must be downloaded.

Included Datasets:

  • Sales Data (projects/01_sales_forecasting/data/sales_data.csv)
  • Fraud Data (projects/02_fraud_detection/data/fraud_data.csv)
  • Course Data (projects/03_course_recommendation/data/course_data.csv)

External Datasets:

For large datasets (e.g., ImageNet, COCO), see data/README.md for download instructions.

Example Download Script:

cd data
python download_data.py

πŸ”¬ Projects

1. Sales Forecasting (projects/01_sales_forecasting/)

Predict future sales using Decision Tree Regressor.
Techniques: Regression, OneHotEncoding, Model Evaluation (RΒ², MSE)

2. Fraud Detection (projects/02_fraud_detection/)

Detect fraudulent credit card transactions.
Techniques: Classification, Imbalanced Data Handling, Precision-Recall

3. Course Recommendation (projects/03_course_recommendation/)

Recommend courses based on user goals and hobbies.
Techniques: Decision Trees, Categorical Encoding, Multi-class Classification


πŸ’‘ Example Commands

# Clone repository
git clone https://github.com/flowdiary/MLM-101.git
cd MLM-101

# Setup virtual environment
python3 -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run Jupyter Notebook
jupyter notebook

# Run a project script
cd projects/01_sales_forecasting
python sales_forecasting.py

# Run Streamlit app
cd projects/01_sales_forecasting
streamlit run sales_app.py

# Run FastAPI app
cd apps/fastapi_app
uvicorn app:app --reload

# Run tests
pytest tests/

# Docker deployment
cd docker
docker-compose up --build

πŸ› Troubleshooting

Common Issues

1. ModuleNotFoundError: No module named 'xyz'

# Ensure you're in the correct environment
source venv/bin/activate  # or: conda activate mlm101

# Install missing package
pip install xyz

2. Jupyter Kernel Not Found

# Install IPython kernel
python -m ipykernel install --user --name=mlm101

3. Permission Denied (macOS/Linux)

# Use pip with --user flag
pip install --user -r requirements.txt

4. CUDA/GPU Issues (Deep Learning)

# Verify TensorFlow GPU installation
python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

# Install CPU-only version if no GPU
pip install tensorflow-cpu

5. Port Already in Use (Streamlit/FastAPI)

# Change port for Streamlit
streamlit run app.py --server.port 8502

# Change port for FastAPI
uvicorn app:app --port 8001

Additional Help


🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Quick Contribution Steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -m 'Add new feature')
  4. Push to the branch (git push origin feature/your-feature)
  5. Open a Pull Request

Areas for Contribution:

  • πŸ› Bug fixes
  • πŸ“ Documentation improvements
  • πŸ§ͺ New project examples
  • 🌐 Translations
  • πŸ“Š Additional datasets

πŸ“œ License

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

You are free to:

  • βœ… Use commercially
  • βœ… Modify
  • βœ… Distribute
  • βœ… Use for private purposes

Under the conditions:

  • ℹ️ Include license and copyright notice
  • ℹ️ State changes made to the code

πŸ™ Acknowledgments

Course Instructors:

  • Muhammad Auwal Ahmad - Co-founder, Flowdiary
  • Abdullahi Ahmad - MLM Tutor, Flowdiary

Contributors:

  • All students and community contributors

Special Thanks:

  • Scikit-learn, TensorFlow, and PyTorch communities
  • Open-source library maintainers

πŸ“§ Contact


⭐ Star this repository if you find it helpful!

GitHub stars GitHub forks

Made by Flowdiary

About

Machine Learning Mastery (MLM-101): A ten-phase practical course (handouts + code) covering theory, applications, model types & building real systems.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •