Gradient Descent Optimizer Calculator

Tune learning rate, momentum, and stopping rules easily. Model stable optimization for polynomial objectives accurately. Visualize every update before choosing better training parameters today.

Calculator Inputs

Example Data Table

Scenario Polynomial Start x Learning Rate Momentum Tolerance Expected Trend
Default convex curve x² - 6x + 13 8 0.10 0.20 0.0001 Moves toward x = 3
Sharper quartic bowl 0.05x⁴ + x² - 4x + 7 5 0.03 0.35 0.0001 Requires smaller updates
Wide quadratic path 0.4x² - 2x + 9 -6 0.18 0.10 0.0010 Converges with larger steps

Formula Used

The calculator optimizes a polynomial objective:

f(x) = c₄x⁴ + c₃x³ + c₂x² + c₁x + c₀

The gradient is:

f′(x) = 4c₄x³ + 3c₃x² + 2c₂x + c₁

The effective learning rate uses decay:

αᵢ = α / (1 + decay × (i - 1))

The momentum update is:

vᵢ = βvᵢ₋₁ - αᵢgᵢ

The new position is:

xᵢ₊₁ = xᵢ + vᵢ

For maximization, the gradient direction is inverted before the update. Gradient clipping limits unstable steps when the derivative becomes too large.

How to Use This Calculator

  1. Enter the polynomial coefficients for your objective function.
  2. Choose whether you want to minimize or maximize the function.
  3. Set the starting x value and learning rate.
  4. Adjust momentum, decay, gradient clip, tolerance, and iteration limit.
  5. Click Run Optimizer to generate the convergence summary.
  6. Review the metrics, chart, and iteration table.
  7. Export the iteration history through CSV or PDF download buttons.

Related Calculators

knapsack problem solverslack variable calculatorbranch and bound solverconvex hull calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.