Skip to content

Repository files navigation

AI From Scratch

The purpose of this repository is to understand the mathematics and implementation details behind Machine Learning algorithms before relying on high-level frameworks.


Current Implementations

Algorithm Status
Linear Regression
Logistic Regression
K-Nearest Neighbors (KNN)
Perceptron

Planned Implementations

Algorithm Status
k-means clustering
Decision Tree
Random Forest
Naive Bayes
Support Vector Machine (SVM)
Neural Networks
Convolutional Neural Networks (CNN)
Recurrent Neural Networks (RNN)

-i've written an article about Logistic Regression and the mathematics behind it. if u like u can take a look at it!

-https://vrgl.ir/TIDBe


Implemented Algorithms

Linear Regression

Linear Regression predicts continuous numerical values by fitting a straight line to the training data.

Mathematical Model

$$ \hat{y}=wx+b $$

Loss Function

Huber Loss

Optimizer

Gradient Descent


Example Result


Logistic Regression

Logistic Regression is a binary classification algorithm that predicts probabilities using the Sigmoid activation function.

Linear Model

$$ z=wx+b $$

Activation Function

Sigmoid

$$ \sigma(z)=\frac1{1+e^{-z}} $$

Loss Function

Binary Cross Entropy (BCE)

Optimizer

Gradient Descent


Example Result


Other Models pic (knn, perceptron)

About

Implementing Machine Learning and Deep Learning algorithms from scratch.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages