col_gen_estimator.BooleanDecisionRuleClassifierWithHeuristic¶
- class col_gen_estimator.BooleanDecisionRuleClassifierWithHeuristic(max_iterations=-1, C=10, p=1, rmp_solver_params='', rmp_solver='glop', master_ip_solver_params='', subproblem_solver='cbc', subproblem_params=[[''], ['']])[source]¶
Binary classifier using boolean decision rule generation method with heuristic for column generation.
- Parameters:
- max_iterationsint, default=-1
Maximum column generation iterations. Negative values removes the iteration limit and the problem is solved till optimality.
- Cint,default=10,
A parameter used for controlling the overall complexity of decision rule.
- pfloat,default=1
A parameter used for balancing the penalty between false negatives and false positives. Higher value of p would result in more penalty for the false negatives.
- rmp_solver_params: string, default = “”,
Solver parameters for solving restricted master problem (rmp).
- rmp_solver: string, default = “glop”,
Solver used for solving restricted master problem (rmp).
- master_ip_solver_params: string, default = “”,
Solver parameters for solving the integer master problem.
- subproblem_solver: string, default = “cbc”,
Solver used for solving subproblem.
- subproblem_params: list of strings, default = [“”,””],
Parameters for solving the subproblem. First string is for the heuristic method and the second is for the integer program.
- Attributes:
- X_ndarray, shape (n_samples, n_features)
The input passed during
fit().- y_ndarray, shape (n_samples,)
The labels passed during
fit().- classes_ndarray, shape (n_classes,)
The classes seen at
fit().
- __init__(max_iterations=-1, C=10, p=1, rmp_solver_params='', rmp_solver='glop', master_ip_solver_params='', subproblem_solver='cbc', subproblem_params=[[''], ['']])[source]¶
- set_score_request(*, sample_weight: bool | None | str = '$UNCHANGED$') BooleanDecisionRuleClassifierWithHeuristic¶
Request metadata passed to the
scoremethod.Note that this method is only relevant if
enable_metadata_routing=True(seesklearn.set_config()). Please see User Guide on how the routing mechanism works.The options for each parameter are:
True: metadata is requested, and passed toscoreif provided. The request is ignored if metadata is not provided.False: metadata is not requested and the meta-estimator will not pass it toscore.None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.str: metadata should be passed to the meta-estimator with this given alias instead of the original name.
The default (
sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.New in version 1.3.
Note
This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a
Pipeline. Otherwise it has no effect.- Parameters:
- sample_weightstr, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED
Metadata routing for
sample_weightparameter inscore.
- Returns:
- selfobject
The updated object.