diff --git "a/math-ds-complete/index.html" "b/math-ds-complete/index.html" --- "a/math-ds-complete/index.html" +++ "b/math-ds-complete/index.html" @@ -16,6 +16,7 @@ + + + + + +
+

⚙️ Algorithm Details

+ +
+ +
+

💻 Implementation (Python)

+
+ from sklearn.linear_model import LinearRegression
+ import numpy as np

+ # Training data
+ X = np.array([[1000], [1500], [2000], [3000]])
+ y = np.array([150, 200, 250, 350])

+ # Create and train model
+ model = LinearRegression()
+ model.fit(X, y)

+ # Make prediction
+ prediction = model.predict([[2500]])
+ print(f"Predicted price: ${prediction[0]}k")

+ # Model parameters
+ print(f"Slope: {model.coef_[0]:.3f}")
+ print(f"Intercept: {model.intercept_:.2f}")
+
+
+ +
+

📊 Interactive Visualization

+ +
+ + +
+
+ +
+

🔍 Algorithm Comparison

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
AspectLinear RegressionPolynomial Regression
ComplexitySimple (straight line)Complex (curved line)
Overfitting RiskLowHigh (with high degree)
InterpretabilityVery easyModerate
Training SpeedVery fastFast
+
+ +
+

🎯 Key Takeaways

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +