Instructions:
• Initial parameters (intercept) and (slope) are set randomly on each dataset load
• Click "Step" to perform exactly one gradient descent iteration
• Watch the regression line evolve on the normalized data plot (left)
• Track the optimization path on the cost surface (right)
• Use "Re-initialize" to generate new random starting parameters
• Choose from sample dataset or civil engineering examples (all data is normalized) Algorithm (Batch Gradient Descent):
• Model: (on normalized data)
• Cost:
• Update: Simultaneously compute gradients and update both parameters
• Learning rate : Controls step size (default 0.1 works well for normalized data)
Visualization:
• Left panel: Normalized data points, current regression line, residuals (dashed red lines)
• Right panel: Cost surface contours, current position (red dot), optimization path
• Readouts: Current iteration, normalized parameters, cost, and gradient norm
Data & Regression Line
Cost Surface
Ready to start gradient descent. Click "Step" to begin.