Skip to content

ledp1/implementing-ai-algorithms-from-scratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Implementing AI Algorithms from Scratch

This repository contains from-scratch Python implementations of core machine-learning algorithms, built exclusively with NumPy for numerical computation and Matplotlib for visualization. Each implementation is accompanied by clear documentation and plots that illuminate the underlying mathematics and practical considerations.

Project Structure

regression-and-gradient-descent/

Comprehensive collection of linear regression and gradient descent implementations:

Core Algorithm Implementations:

  • gradient_descent_calculation.py - Basic gradient descent algorithm implementation
  • gradient_descent_cost_function.py - Cost function calculations for gradient descent
  • gradient_descent_parameter_adjustment.py - Implementation of gradient descent with parameter adjustment
  • gradient_descent_real_estate_market.py - Application of gradient descent to real estate market analysis
  • Applying Gradient Descent to Linear Regression.py - Integration of gradient descent with linear regression
  • linear_regression_analysis.py - Fundamental linear regression analysis

Multiple Linear Regression:

  • multiple Linear Regression Exercise.py - Exercise implementation
  • multiple_linear_regression_analysis_1.py - Basic multiple regression analysis
  • multiple_linear_regression_analysis_2.py - Advanced multiple regression with feature analysis
  • multiple_linear_regression_analysis_3.py - Extended multiple regression implementation

Real-World Applications:

  • house_price_prediction.py - House price prediction using multiple linear regression
  • Real estate market model.py - Real estate market analysis model
  • sales_regression_model_1.py - Sales prediction based on advertising costs
  • sales_regression_model_2.py - Enhanced sales regression model
  • sales_regression_model_3.py - Advanced sales regression analysis

Each implementation includes detailed documentation, visualizations, and practical examples.

Features

  • Implements AI algorithms from first principles
  • Uses NumPy for efficient numerical computations
  • Visualizes data and results with Matplotlib
  • Modular code for easy extension

Requirements

  • Python 3.x
  • NumPy
  • Matplotlib

Installation

  1. Clone the repository:
    git clone https://github.com/ledp1/implementing-ai-algorithms-from-scratch.git
    cd implementing-ai-algorithms-from-scratch
  2. Create and activate a virtual environment:
    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:
    pip install numpy matplotlib

Usage

Navigate to the specific algorithm folder and run any script. Each implementation includes:

  • Detailed documentation
  • Sample data or examples
  • Visualization of results
  • Explanation of the underlying concepts

Contact

Questions or feedback? Feel free to reach out:

License

This project is licensed under the MIT License - see the LICENSE file for details.

Ask DeepWiki

About

Python implementations of AI and machine learning algorithms from scratch.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages