An optimal solution is a feasible assignment of decision variables that produces the best objective value while satisfying every constraint. In binary feature selection, each variable indicates whether a feature is selected. section 8.2.6
A linear-programming solution is evaluated through:
- Feasibility: decision variables obey bounds, such as 0 or 1, and all inequality constraints. section 8.2.6
- Objective value: minimizing negated priorities effectively maximizes the selected features' priority score. section 8.2.6
Binary feature selection
Calling scipy.optimize.linprog with the HiGHS method returns success=True and a binary assignment selecting 12 features. The resulting priority score is 17.6. section 8.2.6
>>> from scipy.optimize import linprog >>> import numpy as np >>> result = linprog(c, A_ub = A_ub, b_ub = b_ub, >>> bounds = x_bounds, method = 'highs')
Inspect the SciPy call that computes the constrained solution from objective coefficients, inequality constraints, bounds, and a solver method. section 8.2.6


