opendataval.dataval.DataBanzhaf#
- class opendataval.dataval.DataBanzhaf(*args, **kwargs)#
Data Banzhaf implementation.
References#
Parameters#
- num_modelsint, optional
Number of models to take to compute Banzhaf values, by default 1000
- random_stateRandomState, optional
Random initial state, by default None
- __init__(num_models: int = 1000, random_state: RandomState | None = None)#
Methods
__init__
([num_models, random_state])evaluate
(y, y_hat)Evaluate performance of the specified metric between label and predictions.
evaluate_data_values
()Return data values for each training data point.
input_data
(x_train, y_train, x_valid, y_valid)Store and transform input data for Data Banzhaf.
input_fetcher
(fetcher)Input data from a DataFetcher object.
input_metric
(metric)Input the evaluation metric.
input_model
(pred_model)Input the prediction model.
input_model_metric
(pred_model, metric)Input the prediction model and the evaluation metric.
setup
(fetcher[, pred_model, metric])Inputs model, metric and data into Data Evaluator.
train
(fetcher[, pred_model, metric])Store and transform data, then train model to predict data values.
train_data_values
(*args, **kwargs)Trains model to predict data values.
Attributes
Evaluators
data_values
Cached data values.