You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Squares the condition number; use only for small problems.
Regularize against multicollinearity / overfit
RidgeRegression(alpha=...)
Closed-form ridge.
Polynomial fit
polynomial_features(X, degree) then any regressor
Degree-only expansion; no cross terms.
Tolerances and tuning notes
Most iterative methods take tol and max_iter, but not all solvers
share the same controls. For example, romberg uses max_levels,
adaptive_simpson uses tol and max_depth, rk45_adaptive uses
rtol, atol, and max_steps, and the fixed-step ODE solvers use
n_steps.
Defaults are conservative; tighten tol for higher precision and raise
the iteration or step cap if you see ConvergenceError on a problem you
believe should converge.
Custom ConvergenceError carries the partial result on its
.result attribute – catch it and inspect the iterates to debug.
Vectorize integrands when possible: every quadrature routine accepts
array input via NumPy broadcasting, so writing f(x) = np.sin(x) is faster
than a Python loop calling math.sin.