🔍 Interactive Linear Regression
📈 Data & Regression Line
📉 Cost Function (Gradient Descent Only)
How it works:
OLS: Calculates the optimal line analytically using the formula: slope = (n∑xy - ∑x∑y)/(n∑x² - (∑x)²)
Gradient Descent: Iteratively adjusts slope and intercept by following the negative gradient of the cost function