Measure roc
auto_circuit.metrics.official_circuits.measure_roc
Attributes
Classes
Functions
measure_roc
measure_roc(task_prune_scores: TaskPruneScores) -> TaskMeasurements
Wrapper of
measure_task_roc
that measures the ROC curve for each task and algorithm.
Source code in auto_circuit/metrics/official_circuits/measure_roc.py
measure_task_roc
measure_task_roc(model: PatchableModel, official_edges: Set[Edge], prune_scores: PruneScores, all_edges: bool = False) -> Measurements
Finds points for the Receiver Operating Characteristic (ROC) curve that
measures the performance of the given prune_scores
at classifying which edges
are in or out of the circuit defined by official_edges
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model |
PatchableModel
|
The model to measure the ROC curve for. |
required |
official_edges |
Set[Edge]
|
The edges that define the correct circuit. |
required |
prune_scores |
PruneScores
|
The pruning scores to measure the ROC curve for. The scores define an ordering of the edges in the model. We sweep through the scores in descending order, including the top-k edges in the circuit. |
required |
all_edges |
bool
|
By default we calculate the True Positive Rate (TRP) and False
Positive Rate (FPR) for the set of [number of edges] determined by passing
|
False
|
Returns:
Type | Description |
---|---|
Measurements
|
A list of points that define the ROC curve. Each point is a tuple of the form
|