A collection of machine learning algorithms implemented in MATLAB/Octave and Python, covering supervised learning, unsupervised learning, and recommender systems.
| # | Topic | Description | Language |
|---|---|---|---|
| 01 | Linear Regression | Univariate and multivariate regression with gradient descent and normal equations | MATLAB |
| 02 | Logistic Regression | Binary classification with regularization and polynomial decision boundaries | MATLAB |
| 03 | Multiclass Classification | One-vs-all logistic regression and pre-trained neural network for digit recognition | MATLAB |
| 04 | Neural Networks | Two-layer neural network trained from scratch with backpropagation | MATLAB |
| 05 | Bias-Variance Tradeoff | Polynomial regression with learning curves and regularization parameter selection | MATLAB |
| 06 | Support Vector Machines | Linear and RBF kernel SVMs, plus a spam email classifier | MATLAB |
| 07 | K-Means Clustering | Clustering algorithm applied to 2D data and image compression | MATLAB |
| 08 | Principal Component Analysis | Dimensionality reduction on 2D data, face images, and pixel data | MATLAB |
| 09 | Anomaly Detection | Gaussian-based anomaly detection for server monitoring | MATLAB |
| 10 | Recommender Systems | Collaborative filtering for movie recommendations (MovieLens dataset) | MATLAB |
| 11 | Normal Distribution | Gaussian PDF utilities, visualization, and maximum likelihood estimation | MATLAB |
| 12 | Linear Regression (Python) | Linear regression from scratch in Python with gradient descent | Python |
- Regression: Linear regression (univariate/multivariate), polynomial regression, regularization
- Classification: Logistic regression, one-vs-all, neural networks, SVMs, spam classification
- Clustering: K-Means with image compression application
- Dimensionality Reduction: PCA with eigenfaces and data visualization
- Anomaly Detection: Gaussian-based outlier identification
- Collaborative filtering for movie recommendations
| Linear Regression | Logistic Regression | K-Means Clustering |
|---|---|---|
![]() |
![]() |
![]() |
| SVM Classification | PCA | Anomaly Detection |
|---|---|---|
![]() |
![]() |
![]() |
The MATLAB exercises are based on Andrew Ng's Machine Learning course on Coursera (Stanford University / DeepLearning.ai). All exercises were completed by Keivan Hassani Monfared.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.





