ErrorReport#

from tmlt.tune import ErrorReport
class tmlt.tune.ErrorReport(tunable_values, parameters, protected_inputs, unprotected_inputs, privacy_budget, dp_outputs, baseline_outputs, metric_results)#

Bases: object

Output of a single error report run.

This class is not intended to be constructed directly. Instead, it is returned by the error_report() method.

tunable_values: Dict[str, Any]#

The value of each tunable used for this error report.

parameters: Dict[str, Any]#

The value of each parameter used in this error report. This includes both tunable and non-tunable parameters.

protected_inputs: Dict[str, ProtectedInput]#

The protected inputs used for this error report.

unprotected_inputs: Dict[str, UnprotectedInput]#

The unprotected inputs used for this error report.

privacy_budget: PrivacyBudget#

The privacy budget used for this error report.

dp_outputs: Dict[str, DataFrame]#

The differentially private outputs of the program.

baseline_outputs: Dict[str, Dict[str, DataFrame]]#

The outputs of the baseline program.

metric_results: List[MetricResult]#

The metrics computed on the outputs of the dp and baseline programs.

dataframes()#

Returns a DataFrame for each metric, keyed by the result column name.

Return type:

Dict[str, DataFrame]

dataframe()#

Returns a DataFrame representation of the error report.

The DataFrame will have a column for each parameter, tunable, and metric. If all metrics have the same grouping columns, the dataframe will have one row per combination of grouping columns values. If the metrics have different groupings columns, this method will throw an error.

If some combinations of grouping columns values are associated with only some of the metrics, the missing metrics appear as null values in the output DataFrame.

Return type:

DataFrame

format()#

Return a string representation of this object.

show()#

Prints the error report in a nicely-formatted, human-readable way.