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.
Comprehensive collection of linear regression and gradient descent implementations:
Core Algorithm Implementations:
gradient_descent_calculation.py- Basic gradient descent algorithm implementationgradient_descent_cost_function.py- Cost function calculations for gradient descentgradient_descent_parameter_adjustment.py- Implementation of gradient descent with parameter adjustmentgradient_descent_real_estate_market.py- Application of gradient descent to real estate market analysisApplying Gradient Descent to Linear Regression.py- Integration of gradient descent with linear regressionlinear_regression_analysis.py- Fundamental linear regression analysis
Multiple Linear Regression:
multiple Linear Regression Exercise.py- Exercise implementationmultiple_linear_regression_analysis_1.py- Basic multiple regression analysismultiple_linear_regression_analysis_2.py- Advanced multiple regression with feature analysismultiple_linear_regression_analysis_3.py- Extended multiple regression implementation
Real-World Applications:
house_price_prediction.py- House price prediction using multiple linear regressionReal estate market model.py- Real estate market analysis modelsales_regression_model_1.py- Sales prediction based on advertising costssales_regression_model_2.py- Enhanced sales regression modelsales_regression_model_3.py- Advanced sales regression analysis
Each implementation includes detailed documentation, visualizations, and practical examples.
- Implements AI algorithms from first principles
- Uses NumPy for efficient numerical computations
- Visualizes data and results with Matplotlib
- Modular code for easy extension
- Python 3.x
- NumPy
- Matplotlib
- Clone the repository:
git clone https://github.com/ledp1/implementing-ai-algorithms-from-scratch.git cd implementing-ai-algorithms-from-scratch - Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install numpy matplotlib
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
Questions or feedback? Feel free to reach out:
- Email: depombo2@gmail.com
- LinkedIn: https://www.linkedin.com/in/ldp1
This project is licensed under the MIT License - see the LICENSE file for details.