🔍 Interactive Linear Regression

📊 Data Generation

50 1.0

⚙️ Algorithm Settings

📈 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

📊 Current Results

📈 Statistics