lir.lrsystems.binary_lrsystem module
- class lir.lrsystems.binary_lrsystem.BinaryLRSystem(pipeline: Transformer)[source]
Bases:
LRSystemLR system for binary data and a linear pipeline.
This may be used in specific source feature based LR systems.
In this strategy, a set of instances - captured within the feature vector X - and a set of (ground-truth) labels are used to train and afterward calculate corresponding LLR’s for given feature vectors.
- Parameters:
pipeline (Transformer) – Transformer pipeline used to fit and score instances.
- apply(instances: InstanceData) LLRData[source]
Use LR system to calculate the LLR data from the instance data.
Applies the specific source LR system on a set of instances, optionally with corresponding labels, and returns a representation of the calculated LLR data through the LLRData tuple.
The returned set of LLRs has the same order as the set of input instances, and the returned labels are unchanged from the input labels.
- Parameters:
instances (InstanceData) – Input instances to be processed by this method.
- Returns:
Likelihood-ratio data produced by applying the LR system.
- Return type:
- fit(instances: InstanceData) Self[source]
Fit the model on the given instance data.
- Parameters:
instances (InstanceData) – Input instances to be processed by this method.
- Returns:
This LR system instance after fitting the pipeline.
- Return type:
Self