The ridge regression minimizes the following objective function:
J(θ) = Σ(y - Xθ)² + λΣθ²
where:
J(θ) is the cost function. y is the observed outcome. Xθ is the predicted outcome. λ is the regularization parameter. θ represents the model coefficients.
The term λΣθ² acts as a penalty for large coefficients, effectively shrinking them and thus reducing overfitting.