opendataval.dataval.DataEvaluator#

class opendataval.dataval.DataEvaluator(*args, **kwargs)#

Abstract class of Data Evaluators. Facilitates Data Evaluation computation.

The following is an example of how the api would work:

dataval = (
    DataEvaluator(*args, **kwargs)
    .input_data(x_train, y_train, x_valid, y_valid)
    .train_data_values(batch_size, epochs)
    .evaluate_data_values()
)

Parameters#

random_stateRandomState, optional

Random initial state, by default None

argstuple[Any]

DavaEvaluator positional arguments

kwargsDict[str, Any]

DavaEvaluator key word arguments

Attributes#

pred_modelModel

Prediction model to find how much each training datum contributes towards it.

data_values: np.array

Cached data values, used by opendataval.experiment.exper_methods

__init__(random_state: RandomState | None = None, *args, **kwargs)#

Methods

__init__([random_state])

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 DataEvaluator.

input_fetcher(fetcher)

Input data from a DataFetcher object.

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.