GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - mjmaher987/Machine-Learning: Advanced topics in ML

BranchesTags
Open more actions menu

Latest commit

 

History

48 Commits
48 Commits

Folders and files

NameName
Last commit message
Last commit date
Classification
Classification
 
 
LDA and QDA
LDA and QDA
 
 
NLP
NLP
 
 
Regression
Regression
 
 
assets
assets
 
 
ISLRv2_website.pdf
ISLRv2_website.pdf
 
 
README.md
README.md
 
 

Repository files navigation

๐Ÿค– Machine Learning โ€” A Hands-On, Beginner-Friendly Collection

banner

A tour through classical machine learning โ€” implemented and explained from the ground up. Each notebook tackles a real dataset, and this README walks you through what each method actually does, in plain language.

  • Author: Mohammad Javad Maheronnaghsh

๐Ÿ“˜ New to ML? Every method below starts with a "๐Ÿ’ก In plain English" box โ€” no formulas, no jargon โ€” so you can build intuition before touching the code.


๐Ÿงญ The big picture

Machine learning is about learning patterns from data instead of being explicitly programmed. The two main families:

  • Supervised learning โ€” you have labeled examples (input โ†’ correct answer) and the model learns to predict the answer for new inputs. Splits into:
    • Regression โ†’ predict a number (e.g. house price).
    • Classification โ†’ predict a category (e.g. spam / not-spam).
  • Unsupervised learning โ€” no labels; the model finds structure on its own (e.g. grouping similar items, compressing data).
Folder Methods Type
Regression/ Linear ยท Lasso/Ridge ยท Polynomial & Splines Supervised (number)
Classification/ Logistic Regression ยท Decision Tree ยท Bagging ยท AdaBoost ยท SVM ยท Neural Nets Supervised (category)
Classification/ (PCA, K-Means) PCA ยท K-Means Unsupervised
LDA and QDA/ Linear & Quadratic Discriminant Analysis Supervised (category)
NLP/ Naive Bayes text classification Supervised (text)

๐Ÿ“š The classic textbook An Introduction to Statistical Learning (ISLR) is included as a reference.


๐Ÿ“ˆ Regression โ€” predicting a number

๐Ÿ’ก In plain English: Regression draws the "best-fit" relationship between inputs and a numeric output, so you can predict that output for new inputs. Linear regression fits a straight line; if the line bends, you need a curve.


Insurance data โ€” how charges relate to age. Regression learns the trend through points like these.

  • Linear Regression โ€” the foundational straight-line fit.
  • Lasso & Ridge โ€” linear regression with regularization: a penalty that keeps the model simple to avoid overfitting (memorizing noise instead of learning the trend). Lasso can even switch off useless features entirely.
  • Polynomial Regression & Splines โ€” fit curves instead of lines for non-linear data. But more flexibility isn't always better:


Choosing complexity: test error vs. polynomial degree. Too simple underfits; too complex overfits โ€” the sweet spot is in between.

๐Ÿ“‚ Regression/


๐Ÿท๏ธ Classification โ€” predicting a category

๐Ÿ’ก In plain English: Classification sorts inputs into buckets. Logistic regression โ€” despite the name โ€” is a classifier: it outputs the probability that something belongs to a class (e.g. "85% likely diabetic").


Before modeling, explore the data โ€” here a correlation heatmap of the Pima diabetes features shows which ones move together.

  • Logistic Regression โ€” probabilistic linear classifier (on the diabetes dataset).
  • Decision Tree โ€” a flowchart of yes/no questions that splits data into classes.
  • Bagging โ€” train many trees on random subsets and average them to reduce variance (this is the idea behind Random Forests).
  • AdaBoost โ€” train models in sequence, each one focusing on the mistakes of the last (boosting).

๐Ÿ’ก Why ensembles (Bagging / Boosting)? One model can be wrong; a committee of models that vote is usually more accurate and stable.

๐Ÿ“‚ Classification/


๐Ÿ“ SVM, PCA, K-Means & Neural Networks

๐Ÿ’ก Support Vector Machine (SVM): finds the boundary that separates two classes with the widest possible margin โ€” the cleanest dividing line.

๐Ÿ’ก PCA (Principal Component Analysis): a way to compress data by keeping only its most important directions of variation. Applied to face images, the "principal components" look like ghostly template faces (eigenfaces) that can be combined to reconstruct any face.


Left: an original face. Right: a PCA component ("eigenface") โ€” a reusable building block PCA learns from the dataset.

๐Ÿ’ก K-Means (clustering): an unsupervised method that groups data into K clusters by repeatedly assigning points to the nearest cluster center and updating the centers.

๐Ÿ’ก Neural Networks: layers of simple units that together learn complex patterns โ€” the foundation of deep learning.

๐Ÿ“‚ Classification/SVM - PCA - KMeans - Neural Netwroks.ipynb


๐ŸŽฏ LDA & QDA

๐Ÿ’ก In plain English: LDA and QDA classify by modeling what each class's data looks like (its distribution) and asking "which class most likely produced this point?" LDA assumes a straight boundary between classes; QDA allows a curved one.

๐Ÿ“‚ LDA and QDA/


๐Ÿ’ฌ NLP โ€” Naive Bayes text classification

๐Ÿ’ก In plain English: To classify text (e.g. positive vs. negative review), Naive Bayes counts how typical each word is for each class and multiplies the evidence together. It's "naive" because it pretends words are independent โ€” yet it works remarkably well. Often paired with TF-IDF, which weights words by how informative they are.

๐Ÿ“‚ NLP/


๐Ÿงฎ Loss Functions โ€” how a model measures its mistakes

A model improves by minimizing a loss (a score of how wrong it is). Which loss you use depends on the task:

Loss Used for Intuition
MSE (Mean Squared Error) Regression Penalizes big errors quadratically
Cross-Entropy (binary / categorical) Classification Punishes confident wrong answers
Hinge Loss SVMs Rewards a wide separating margin
Logistic Loss Logistic Regression Probabilistic version of classification error

๐Ÿ’ก Good to know: most loss functions come from Maximum Likelihood Estimation (MLE) โ€” e.g. Cross-Entropy arises from the Bernoulli distribution, and MSE from the Normal (Gaussian) distribution.


๐Ÿ“ Handy notes

  • Logistic Regression is classification, not regression โ€” the name is historical.
  • The three classical linear regressions are Linear, Lasso, and Ridge.
  • Regularization (Lasso/Ridge) is the main tool against overfitting.

๐Ÿ”— Useful Links

  • What is ML, in simple words (English)
  • Papers With Code โ€” methods catalog
  • ML in simple words (Persian)
  • Dr. Sharifi Zarchi & Mr. Azarkhalili's ML course (Sharif University)

๐Ÿš€ Getting Started

git clone https://github.com/mjmaher987/Machine-Learning.git
cd Machine-Learning

pip install numpy pandas scikit-learn matplotlib seaborn

# open any notebook, e.g.:
jupyter notebook "Regression/Linear Regression.ipynb"

If you're new, follow the folders in order: Regression โ†’ Classification โ†’ SVM/PCA/K-Means โ†’ LDA/QDA โ†’ NLP.


๐Ÿ—บ๏ธ Roadmap

  • Upload lecture notes & useful slides
  • Add curated courses (videos) with assignments and solutions
  • Grow into a question bank for teaching assistants

About

Advanced topics in ML

Topics

classical-machine-learningdeep-learningmachine-learningneural-networksnlp-machine-learningself-supervised-learningunsupervised-learning

Resources

Readme
Activity

Stars

5 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.