Solver¶
The linear programming model used for optimizing rule sets can be described by the following formulation:
where
\(w_j\) represents the rule weights,
\(\lambda \geq 0\) is a hyperparameter used to scale different units in the objective function, emphasizing the trade-off between accuracy and rule costs,
\(c_j\) represents the costs associated with each rule, potentially reflecting the complexity or length of the rule for promoting sparsity,
\(\hat{a}_{ij}\) is a measure of the classification accuracy of rule \(j\) for sample \(i\), given that the sample is covered by the rule,
\(v_i\) is a auxiliary variable standing for \(v_i \geq L(\hat{y}_i(w), y_i)\), where a value of \(v_i = 0\) indicates correct classification.
For detailed information, please refer to our manuscript.
- class ruleopt.solver.HiGHSSolver¶
A solver wrapper class for linear optimization using the HiGHS solver.
- __init__(penalty=1.0, use_sparse=False)¶
- Parameters:
penalty (float, default=1.0) – Penalty parameter for the cost in the objective function.
use_sparse (bool, default=False) – Determines whether to use a sparse matrix representation for the optimization problem. Using sparse matrices can significantly reduce memory usage and improve performance for large-scale problems with many zeros in the data.
- class ruleopt.solver.GurobiSolver¶
A solver wrapper class for linear optimization using the Gurobi solver.
- __init__(penalty=1.0, use_sparse=False)¶
- Parameters:
penalty (float, default=1.0) – Penalty parameter for the cost in the objective function.
use_sparse (bool, default=False) – Determines whether to use a sparse matrix representation for the optimization problem. Using sparse matrices can significantly reduce memory usage and improve performance for large-scale problems with many zeros in the data.
- class ruleopt.solver.CPLEXSolver¶
A solver wrapper class for linear optimization using the CPLEX solver.
- __init__(penalty=1.0, use_sparse=False)¶
- Parameters:
penalty (float, default=1.0) – Penalty parameter for the cost in the objective function.
use_sparse (bool, default=False) – Determines whether to use a sparse matrix representation for the optimization problem. Using sparse matrices can significantly reduce memory usage and improve performance for large-scale problems with many zeros in the data.