opendataval.dataval.InfluenceFunction#

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

Influence Function Data evaluation implementation.

TODO it may be useful to compute gradients of the validation dataset in batches to save time/space. TODO H^{-1} implementation, Current implementation is for first-order gradients

References#

Parameters#

grad_argstuple, optional

Positional arguments passed to the model.grad function

grad_kwargsdict[str, Any], optional

Key word arguments passed to the model.grad function

__init__(*grad_args, **grad_kwargs)#

Methods

__init__(*grad_args, **grad_kwargs)

evaluate(y, y_hat)

Evaluate performance of the specified metric between label and predictions.

evaluate_data_values()

Return influence (data values) for each training data point.

input_data(x_train, y_train, x_valid, y_valid)

Store and transform input data for Influence Function Data Valuation.

input_fetcher(fetcher)

Input data from a DataFetcher object.

input_metric(metric)

Input the evaluation metric.

input_model(pred_model)

Input the prediction model with gradient.

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 compute influence of each data point (data values).

Attributes

Evaluators

data_values

Cached data values.