Skip to content

Cranjit9/Machine-Learning-From-Scratch

Repository files navigation

Machine Learning from Scratch in R

ML algorithms implemented from scratch using R

This repository contains machine learning algorithm implementations built from the ground up in R, focusing on understanding the mathematical foundations and core concepts behind each algorithm.

Project Goals

  • Learn by Building: Understand ML algorithms by implementing them from scratch
  • Mathematical Foundation: Focus on the math and logic behind each algorithm
  • Clean R Code: Well-documented, readable R implementations
  • Educational Resource: Serve as a learning tool for ML enthusiasts

Algorithms Implemented

Completed

  • Linear Regression (Simple & Multiple)
  • Logistic Regression
  • K-Nearest Neighbors (KNN)
  • Naive Bayes
  • Binary Decision Tree

Planned Implementations

  • Full Recursive Decision Tree
  • Random Forest
  • Support Vector Machine (SVM)
  • K-Means Clustering
  • Principal Component Analysis (PCA)
  • Linear Discriminant Analysis (LDA)
  • Perceptron
  • AdaBoost
  • Neural Network

Installation and Dependencies

This project uses the following R packages:

Core Dependencies

  • tidyverse - For data manipulation and visualization
  • dplyr - For data wrangling
  • ggplot2 - For plotting and visualization
  • data - Default Built in datsets of R

Install Dependencies

# Install required packages
install.packages(c("tidyverse", "dplyr", "ggplot2", "datasets", "caret"))

Learning Resources

This repository is designed for:

  • Students learning machine learning fundamentals
  • Practitioners wanting to understand algorithms deeply
  • R Enthusiasts interested in ML implementation
  • Anyone curious about the math behind ML

Contributing

This is a personal learning project, but suggestions and improvements are welcome! Feel free to:

  • Open issues for bugs or suggestions
  • Submit pull requests for improvements
  • Share feedback on implementations

Notes

Important: These implementations are for educational purposes.

Built with R for learning Machine Learning from scratch

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages