col_gen_estimator.BDRHeuristic

class col_gen_estimator.BDRHeuristic(K)[source]
Heuristically generates the new columns to be added to the RMP.

Iterates through all size K clauses and returns first one with the negative reduced cost. This extends the BaseSubproblem for column generation classifier.

Parameters:
Kint,

maximum length of generated clauses.

Attributes:
__init__(K)[source]
generate_columns(X, y, dual_costs, params='')[source]

Heuristically generates the new columns to be added to the RMP. Iterates through all size K clauses and returns all that have the negative reduced cost.

In this case instead of directly generating the coefficients, this method returns the list of generated clauses. The Master problem can find the coefficients from it.

Parameters:
Xndarray, shape (n_samples, n_features)

The input. The inputs should only contain values in {0,1}.

yndarray, shape (n_samples,)

The labels. The labels should only contain values in {0,1}.

dual_coststuple(float), size=2

Dual costs of constraints (1b) and (1a) in a tuple.

paramsstring, default=””

unused parameters.