lir.aggregation.base module

class lir.aggregation.base.Aggregation[source]

Bases: ABC

Base representation of an aggregated data collection.

Other classes may extend from this class.

close() None[source]

Finalize the aggregation; no more results will come in.

The close method is called at the end of gathering the aggregation(s) to ensure files are closed, buffers are cleared, or other things that need to finish / tear down.

abstractmethod report(data: AggregationData) None[source]

Report that new results are available.

Parameters:

data (AggregationData) – The aggregated data to be reported.

class lir.aggregation.base.AggregationData(llrdata: LLRData, lrsystem: LRSystem, parameters: dict[str, HyperparameterOption | str], run_name: str, get_full_fit_lrsystem: Callable[[], LRSystem] | None = None)[source]

Bases: NamedTuple

Representation of aggregated data.

llrdata

The LLR data containing LLRs and labels.

Type:

LLRData

lrsystem

The model that produced the results.

Type:

LRSystem

parameters

Parameters that identify the system producing the results.

Type:

dict[str, Any]

run_name

String representation of the run that produced the results.

Type:

str

get_full_fit_lrsystem

Optional callable that lazily provides a model fitted on full data (ignoring splits).

Type:

Callable[[], LRSystem] | None

get_full_fit_lrsystem: Callable[[], LRSystem] | None

Alias for field number 4

llrdata: LLRData

Alias for field number 0

lrsystem: LRSystem

Alias for field number 1

parameters: dict[str, HyperparameterOption | str]

Alias for field number 2

run_name: str

Alias for field number 3