vraven · class
TraceDataset
TraceDataset(sample_ids: 'tuple[str, ...]', true_labels: 'np.ndarray', predicted_labels: 'np.ndarray', target_scores: 'np.ndarray', representations: 'dict[str, np.ndarray]', unit_influences: 'dict[str, np.ndarray]' = <factory>, unit_energies: 'dict[str, np.ndarray]' = <factory>, activation_rms: 'dict[str, np.ndarray]' = <factory>, timing_ms: 'dict[str, np.ndarray]' = <factory>, fingerprints: 'np.ndarray | None' = None, metadata: 'dict[str, Any]' = <factory>) -> NoneAligned sample-level internal measurements.
Rows in every matrix refer to the same ``sample_ids`` in the same order.
This alignment is mandatory for CKA, neighbourhood and paired stability
analyses.
Usage
from vraven import TraceDataset
value = TraceDataset(...)
Methods
cohort(self, *, true_label: 'Any | None' = None, predicted_label: 'Any | None' = None) -> "'TraceDataset'"
Public method.
confusion_cohort(self, name: 'str', *, positive_label: 'Any' = 1) -> "'TraceDataset'"
Public method.
from_reports(reports: 'Sequence[Any]', **kwargs: 'Any') -> "'TraceDataset'"
Public method.
from_traces(traces: 'Sequence[NeuralTrace]', *, true_labels: 'Sequence[Any] | None' = None, sample_ids: 'Sequence[str] | None' = None, strict_layers: 'bool' = True) -> "'TraceDataset'"
Public method.
subset(self, mask: 'Any') -> "'TraceDataset'"
Public method.
Source of truthThis page is generated from the checked-out public symbol, signature, and docstring. Pin the package version for reproducible work.