corneto.methods.milp_carnival#
- corneto.methods.milp_carnival(G, perturbations, measurements, beta_weight=0.2, max_dist=None, penalize='edges', use_perturbation_weights=False, interaction_graph_attribute='interaction', disable_acyclicity=False, backend=<corneto.backend._cvxpy_backend.CvxpyBackend object>)#
Build the supported single-condition CARNIVAL ILP formulation.
This simple formulation accepts one perturbation and measurement mapping. Use
CarnivalILPfor the general multi-condition formulation, orCarnivalFlowwhen a flow-based multi-condition model is required.NOTE: Since the method is decoupled from specific solvers, the default pool of solutions generated using CPLEX is not available.
- Parameters:
G – The graph object representing the network.
perturbations – Perturbations applied to vertices in the graph.
measurements – Measured values for vertices in the graph.
beta_weight (float) – The weight for the regularization term in the objective function.
max_dist – The maximum distance allowed for vertex positions in the graph.
penalize – The type of regularization to apply (‘nodes’, ‘edges’, or ‘both’).
use_perturbation_weights – Whether to weight perturbations in the objective.
interaction_graph_attribute – Graph attribute containing interaction signs.
disable_acyclicity – Whether to disable the acyclicity constraint.
backend – The backend engine to use for the optimization.
- Returns:
The optimization problem object.