boexplain.files.search¶
BOExplain API¶
-
boexplain.files.search.
fmax
(data, f, num_cols=[], cat_cols=[], columns=[], cat_alg=['individual_contribution'], n_trials=2000, runtime=10000, runs=1, k=5, random=False, correct_pred=None, increment=5, name='experiment_name', file=None, return_viz=False, use_seeds_from_paper=False, **kwargs)¶ Use BOExplain to maximize the objective function.
- data
pandas DataFrame of source, training, or inference data from which to derive an explanation.
- f
Objective function to be minimized.
- num_cols
Numerical columns over which to derive an explanation.
- cat_cols
Categorical columns over which to derive an explanation.
- columns
Columns over which to derive an explanation.
- cat_alg
- Algorithms to handle categorical parameters. Can be
‘individual_contribution’
‘categorical’
‘categorical_warm_start’
See the paper for details.
- n_trials
Maximum number of trials to perform during a run.
- runtime
Maximum allowed time for a run in seconds.
- runs
Number of runs to perform.
- k
Number of TPE candidates to consider. (deprecated)
- random
If True, perform a run using random search to find the constraint parameters.
- correct_pred
If provided, will compute f-score, precision, recall, and jaccard similarity of the found predicates and the correct predicate
- increment
How frequently (in seconds) to log results when finding the best result in each increment.
- name
The name of an experiment.
- file
File name to output statistics from the run.
- return_viz
If True, return an Altair visualization of the objective function with iteration on the x-axis.
- use_seeds_from_paper
If True, use the seeds that were used in the paper. For reproducibility.
The input DataFrame filtered to contain all tuples that do not satisfy the explanation
-
boexplain.files.search.
fmin
(data, f, num_cols=[], cat_cols=[], columns=[], cat_alg=['individual_contribution'], n_trials=2000, runtime=10000, runs=1, k=5, random=False, correct_pred=None, increment=5, name='experiment_name', file=None, return_viz=False, use_seeds_from_paper=False, **kwargs)¶ Use BOExplain to minimize the objective function.
- data
pandas DataFrame of source, training, or inference data from which to derive an explanation.
- f
Objective function to be minimized.
- num_cols
Numerical columns over which to derive an explanation.
- cat_cols
Categorical columns over which to derive an explanation.
- columns
Columns over which to derive an explanation.
- cat_alg
- Algorithms to handle categorical parameters. Can be
‘individual_contribution’
‘categorical’
‘categorical_warm_start’
See the paper for details.
- n_trials
Maximum number of trials to perform during a run.
- runtime
Maximum allowed time for a run in seconds.
- runs
Number of runs to perform.
- k
Number of TPE candidates to consider. (deprecated)
- random
If True, perform a run using random search to find the constraint parameters.
- correct_pred
If provided, will compute f-score, precision, recall, and jaccard similarity of the found predicates and the correct predicate
- increment
How frequently (in seconds) to log results when finding the best result in each increment.
- name
The name of an experiment.
- file
File name to output statistics from the run.
- return_viz
If True, return an Altair visualization of the objective function with iteration on the x-axis.
- use_seeds_from_paper
If True, use the seeds that were used in the paper. For reproducibility.
The input DataFrame filtered to contain all tuples that do not satisfy the explanation