Problem-solving strategies for gradient methods in optimization
Use this skill when working on gradient-methods problems in optimization.
Basic Gradient Descent
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) |
Accelerated Methods
scipy.optimize.minimize(f, x0, method='CG') - conjugate gradientNewton's Method
scipy.optimize.minimize(f, x0, method='BFGS')Convergence Diagnostics
sympy_compute.py diff "f" --var x for gradientuv 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)"
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)"
uv run python -m runtime.harness scripts/sympy_compute.py diff "x**2 + y**2" --var "[x, y]"
From indexed textbooks:
See .claude/skills/math-mode/SKILL.md for full tool documentation.
Use the mcporter CLI to list, configure, auth, and call MCP servers/tools directly (HTTP or stdio), including ad-hoc servers, config edits, and CLI/type generation.
Query Google Places API (New) via the goplaces CLI for text search, place details, resolve, and reviews. Use for human-friendly place lookup or JSON output for scripts.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Transcribe audio via OpenAI Audio Transcriptions API (Whisper).
Notion API for creating and managing pages, databases, and blocks.
Capture and automate macOS UI with the Peekaboo CLI.
Category:developer