πŸ“… 2025-03-10 β€” Session: Developed Minimal OLS Regression Plot

πŸ•’ 12:45–13:10
🏷️ Labels: Python, Data Visualization, Regression, Numpy, Matplotlib
πŸ“‚ Project: Dev
⭐ Priority: MEDIUM

Session Goal

The goal of this session was to create a minimal Seaborn-like regplot clone for Ordinary Least Squares (OLS) regression using Python libraries such as NumPy and Matplotlib.

Key Activities

  • Implemented a basic version of Seaborn’s regplot() focusing on OLS regression with NumPy, including scatter plot creation and linear regression line fitting.
  • Developed a minimalist regression plot using NumPy and Matplotlib, emphasizing essential OLS fitting.
  • Demonstrated the replication of Seaborn’s regplot functionality using basic linear algebra for OLS regression.
  • Updated the OLS regression script to include the regress_out() function for removing linear dependencies, enhancing interpretability.
  • Explored the statistical technique of regressing variable B from A while maintaining A’s mean, detailing the mathematical steps involved.
  • Planned a simplified implementation of Seaborn’s regression plot using NumPy’s pseudoinverse.

Achievements

  • Successfully created a minimal OLS regression plot using Python, replicating essential functionalities of Seaborn’s regplot.

Pending Tasks

  • Further refinement of the regression script to enhance flexibility and interpretability.