Gradient methods

From vibeeval/vibecosystem · View interactive version

Gradient methods is an AI agent skill from the GitHub repository vibeeval/vibecosystem. Problem-solving strategies for gradient methods in optimization

How to use this skill

Skill file

Gradient Methods

When to Use

Use this skill when working on gradient-methods problems in optimization.

Decision Tree

  1. Basic Gradient Descent
  1. Step Size Selection

| Method | Approach |

|--------|----------|

| Fixed | alpha constant (requires tuning) |

| Backtracking | Armijo condition: f(x - alphagrad) <= f(x) - calpha*||grad||^2 |

| Exact line search | minimize f(x - alpha*grad) over alpha |

| Adaptive | Adam, RMSprop (ML applications) |

  1. Accelerated Methods
  1. Newton's Method
  1. Convergence Diagnostics

Tool Commands

Scipy_Bfgs

uv run python -c "from scipy.optimize import minimize; res = minimize(lambda x: (x[0]-1)**2 + 100*(x[1]-x[0]**2)**2, [0, 0], method='BFGS'); print('Rosenbrock min at', res.x)"

Scipy_Cg

uv run python -c "from scipy.optimize import minimize; res = minimize(lambda x: x[0]**2 + x[1]**2, [1, 1], method='CG'); print('Min at', res.x)"

Sympy_Gradient

uv run python -m runtime.harness scripts/sympy_compute.py diff "x**2 + y**2" --var "[x, y]"

Key Techniques

From indexed textbooks:

Cognitive Tools Reference

See .claude/skills/math-mode/SKILL.md for full tool documentation.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.