# zotroneneis/machine_learning_basics

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/zotroneneis-machine-learning-basics).**

4,418 stars · 836 forks · Jupyter Notebook · MIT

## Links

- GitHub: https://github.com/zotroneneis/machine_learning_basics
- awesome-repositories: https://awesome-repositories.com/repository/zotroneneis-machine-learning-basics.md

## Topics

`algorithm` `ipynb` `k-nearest-neighbor` `k-nearest-neighbours` `k-nn` `kmeans` `linear-regression` `logistic-regression` `machine-learning` `machine-learning-algorithms` `neural-network` `neural-networks` `perceptron` `python` `python-implementations` `python3`

## Description

This project is a collection of foundational machine learning algorithms and tools implemented from scratch in Python. It serves as a library of core implementations for regression, classification, and clustering models, designed to demonstrate the underlying mathematical structures of these algorithms without relying on high-level machine learning frameworks.

The project focuses on the manual implementation of algorithmic logic, including neural networks with forward propagation and weight updates, as well as various supervised and unsupervised learning models. It utilizes NumPy for vectorization to perform matrix calculations and mathematical operations on large datasets.

The toolkit covers a broad range of capabilities, including dimensionality reduction via Principal Component Analysis and data preprocessing for numerical and image datasets. The algorithmic implementations span linear and Bayesian regression, K-Means clustering, and multiple classification methods such as Support Vector Machines, Decision Trees, and K-Nearest Neighbors.

The project is delivered as a series of Jupyter Notebooks.

## Tags

### Artificial Intelligence & ML

- [From-Scratch ML Model Implementations](https://awesome-repositories.com/f/artificial-intelligence-ml/from-scratch-ml-model-implementations.md) — Provides foundational implementations of machine learning models built from first principles without relying on high-level frameworks.
- [Centroid-Based Clustering](https://awesome-repositories.com/f/artificial-intelligence-ml/centroid-based-clustering.md) — Implements K-Means clustering by iteratively refining center coordinates based on the mean of assigned points.
- [Classification Trees](https://awesome-repositories.com/f/artificial-intelligence-ml/decision-trees/classification-trees.md) — Implements decision trees specifically for categorizing instances into discrete classes through binary splits. ([source](https://github.com/zotroneneis/machine_learning_basics/blob/master/decision_tree_classification.ipynb))
- [Gradient-Based Parameter Updates](https://awesome-repositories.com/f/artificial-intelligence-ml/gradient-based-parameter-updates.md) — Implements weight adjustment logic using gradient descent to minimize prediction error.
- [Hyperplane Margin Maximization](https://awesome-repositories.com/f/artificial-intelligence-ml/hyperplane-margin-maximization.md) — Implements the mathematical logic for maximizing margins in Support Vector Machines.
- [K-Means Clustering](https://awesome-repositories.com/f/artificial-intelligence-ml/k-means-clustering.md) — Implements centroid-based partitioning of unlabeled data into a specified number of clusters using iterative refinement. ([source](https://github.com/zotroneneis/machine_learning_basics/blob/master/kmeans.ipynb))
- [K-Nearest Neighbor Classifiers](https://awesome-repositories.com/f/artificial-intelligence-ml/k-nearest-neighbor-classifiers.md) — Implements supervised learning models that assign classes based on the majority vote of the closest training samples. ([source](https://github.com/zotroneneis/machine_learning_basics/blob/master/k_nearest_neighbour.ipynb))
- [Linear Regression](https://awesome-repositories.com/f/artificial-intelligence-ml/linear-regression.md) — Implements fundamental statistical methods for modeling relationships between variables using linear equations. ([source](https://github.com/zotroneneis/machine_learning_basics/blob/master/linear_regression.ipynb))
- [Bayesian Regressions](https://awesome-repositories.com/f/artificial-intelligence-ml/linear-regression-models/bayesian-regressions.md) — Implements probabilistic linear models that treat parameters as distributions to quantify prediction uncertainty. ([source](https://github.com/zotroneneis/machine_learning_basics/blob/master/bayesian_linear_regression.ipynb))
- [Logistic Regression Models](https://awesome-repositories.com/f/artificial-intelligence-ml/logistic-regression-models.md) — Implements algorithms for predicting binary outcomes using the sigmoid function and weight optimization. ([source](https://github.com/zotroneneis/machine_learning_basics/blob/master/logistic_regression.ipynb))
- [Machine Learning Implementations](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning-implementations.md) — Provides a comprehensive collection of core machine learning algorithms implemented manually in Python.
- [Forward Propagation Engines](https://awesome-repositories.com/f/artificial-intelligence-ml/multilayer-perceptrons/forward-propagation-engines.md) — Implements forward propagation logic using matrix multiplication to calculate layer outputs.
- [Neural Network Implementations](https://awesome-repositories.com/f/artificial-intelligence-ml/neural-network-implementations.md) — Implements an artificial neural network from scratch, demonstrating forward propagation and weight updates.
- [Supervised Classification](https://awesome-repositories.com/f/artificial-intelligence-ml/supervised-classification.md) — Implements supervised classification and regression models including Decision Trees and SVMs.
- [Support Vector Machines](https://awesome-repositories.com/f/artificial-intelligence-ml/support-vector-machines.md) — Implements support vector machines to establish optimal decision boundaries that maximize the margin between classes. ([source](https://github.com/zotroneneis/machine_learning_basics/blob/master/support_vector_machines.ipynb))
- [Unsupervised Learning](https://awesome-repositories.com/f/artificial-intelligence-ml/unsupervised-learning.md) — Implements unsupervised learning algorithms like K-Means to discover patterns in unlabeled data.
- [Perceptrons](https://awesome-repositories.com/f/artificial-intelligence-ml/perceptrons.md) — Implements a basic linear classifier that learns a weight vector to separate two classes of data. ([source](https://github.com/zotroneneis/machine_learning_basics/blob/master/perceptron.ipynb))
- [Posterior Distribution Estimators](https://awesome-repositories.com/f/artificial-intelligence-ml/posterior-inference/posterior-distribution-estimators.md) — Implements Bayesian linear regression by calculating posterior probabilities for linear coefficients using prior beliefs.

### Education & Learning Resources

- [Machine Learning Education](https://awesome-repositories.com/f/education-learning-resources/educational-resources/systems-applied-computing/machine-learning-education.md) — Serves as an educational resource for learning the mathematics of ML by building algorithms from scratch.
- [Softmax Regression](https://awesome-repositories.com/f/education-learning-resources/educational-resources/systems-applied-computing/machine-learning-education/softmax-regression.md) — Provides an implementation of softmax regression for multi-class classification probability prediction. ([source](https://github.com/zotroneneis/machine_learning_basics/blob/master/softmax_regression.ipynb))

### Part of an Awesome List

- [Educational Python Implementations](https://awesome-repositories.com/f/awesome-lists/devtools/frontend-frameworks/no-framework-frontends/pure-language-implementations/educational-python-implementations.md) — Provides algorithmic implementations in pure Python to ensure the internal logic and mathematics are transparent and readable.

### Scientific & Mathematical Computing

- [NumPy-Based Linear Algebra Implementations](https://awesome-repositories.com/f/scientific-mathematical-computing/numpy-based-linear-algebra-implementations.md) — Uses NumPy for vectorization and matrix manipulations to perform efficient mathematical operations on datasets.
- [Dimensionality Reduction](https://awesome-repositories.com/f/scientific-mathematical-computing/dimensionality-reduction.md) — Provides mathematical techniques for reducing high-dimensional data into lower-dimensional spaces based on variance.
- [Principal Component Analysis](https://awesome-repositories.com/f/scientific-mathematical-computing/linear-algebra-routines/principal-component-analysis.md) — Implements Principal Component Analysis to reduce dimensionality by transforming variables into uncorrelated components. ([source](https://github.com/zotroneneis/machine_learning_basics/blob/master/%5Bprincipal_component_analysis.ipynb))
