parm-tuning-as-lp

Formulates discrete hyperparameter tuning as a linear or mixed-integer program.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/thistleknot/skills --skill parm-tuning-as-lp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: parm-tuning-as-lp
Source: https://github.com/thistleknot/skills/tree/main/linear-programming-hyperparm-tuning
Command: npx skills add https://github.com/thistleknot/skills --skill parm-tuning-as-lp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps you tune hyperparameters or system configuration by turning a discrete search problem with measurable objectives and constraints into a linear or mixed-integer programming formulation that can be solved globally and then validated on the real system.

Core Features & Use Cases

  • LP/MILP formulation for discrete knobs: Builds decision-variable models (binary activation per option/slot) with mutual exclusivity and an explicit objective tied to your measured metric.
  • Empirical constraint derivation: Converts observation-study results (quality floors, latency caps, failure-onset thresholds, rate-of-change triggers) into inequality constraints grounded in real runs.
  • Linearization and validation loop: Supports common linearization patterns (max/min via auxiliary variables, bilinear relaxation, Big-M thresholding) and requires re-evaluating the LP-chosen configuration against the actual system, iterating until stable.
  • Anti-correlation handling and fallbacks: Detects when constraints fight due to missing orthogonal dimensions and offers Pareto/tradeoff or grid-search fallback for small discrete spaces.

Quick Start

Use parm-tuning-as-lp to map your candidate discrete hyperparameter options into an LP/MILP with objective and constraints from recent evaluation data, solve it, and then validate the selected configuration on the real system before finalizing.

Frequently Asked Questions about parm-tuning-as-lp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I formulate hyperparameter tuning as a linear programming problem?

Hyperparameter tuning becomes a linear programming problem by mapping discrete configuration options to binary decision variables, defining an objective over measured performance metrics, and adding inequality constraints derived from empirical evaluation data.

When should I use mixed-integer optimization for configuration tuning instead of grid search?

Mixed-integer optimization is ideal when the parameter space is finite, factored into orthogonal levers, and large enough that grid search is impractical, allowing additive or linearizable response models to be precomputed into lookup matrices for global solving.

How do I handle non-linear constraints like max/min or thresholds in a mixed-integer optimization model?

Non-linear constraints in mixed-integer optimization are handled using linearization techniques such as auxiliary variables for max/min functions, Big-M formulations for thresholds, and relaxations for bilinear terms to keep the model solver-ready.

What should I do if my linear programming constraints conflict during model validation?

If linear programming constraints conflict due to missing orthogonal dimensions, the skill detects anti-correlations and offers Pareto tradeoff analysis or falls back to grid search for small discrete parameter spaces.

How do I validate LP-selected configurations against a real system?

Validate LP-selected configurations by applying the chosen parameters to the actual system, measuring real outputs, and refitting linearization assumptions in a ground-truth validation loop that iterates until the configuration stabilizes.