Skip to main content
Version: v0.0.8

Interface: QuasiIdentifierStatistics

Descriptive statistics over consumer-supplied equivalence-class sizes - including the smallest class size, the widely-used k-anonymity indicator.

This is not a risk score and not a determination. It is arithmetic over sizes the consumer supplied: the library counts what it is given, applies no threshold, draws no k ≥ n ⇒ safe conclusion, and emits no verdict. A statistician documents an indicator like this as one input to a §164.514(b)(1) determination - the determination remains theirs. See note.

Example

import { buildExpertDeterminationSupportReport } from "@cosyte/deid";

const report = buildExpertDeterminationSupportReport([], {
quasiIdentifiers: { equivalenceClassSizes: [40, 20, 5, 1, 1] },
});
report.quasiIdentifierStatistics?.minimumEquivalenceClassSize; // => 1
report.quasiIdentifierStatistics?.uniqueRecords; // => 2

Properties

distinctCombinations

readonly distinctCombinations: number

Number of distinct quasi-identifier combinations = the number of equivalence classes supplied.


minimumEquivalenceClassSize

readonly minimumEquivalenceClassSize: number

The smallest equivalence-class size - the k-anonymity indicator. Descriptive only.


note

readonly note: string

The honesty note: this is a descriptive input, never a risk score or determination.


quasiIdentifierSet

readonly quasiIdentifierSet: string | null

The label the consumer gave the quasi-identifier set, or null if unlabelled.


totalRecords

readonly totalRecords: number

Total records across all classes = the sum of the supplied sizes.


uniqueRecords

readonly uniqueRecords: number

How many records fall in a class of size 1 (sample-uniques on the chosen set). Descriptive only.