Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

lir

Package Overview
Dependencies
Maintainers
2
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lir

Package for optimising and evaluating Likelihood Ratio (LR) systems.

pipPyPI
Version
1.0.0
Maintainers
2

LIR Python Likelihood Ratio Toolkit

Toolkit for developing, optimising and evaluating Likelihood Ratio (LR) systems. This allows benchmarking of LR systems on different datasets, investigating impact of different sampling schemes or techniques, and doing case-based validation and computation of case LRs.

LIR was first released in 2020 and redesigned from scratch in 2025, replacing the previous repository.

References

  • LiR documentation: comprehensive overview, terminology and more on developing LR systems
  • Practitioner Guide (branch | paper | notebook): case study using LiR to develop an LR system using LiR
  • Quick Start: selecting / designing the proper LR system based on your data

Installation

LIR is compatible with Python 3.12 and later. The easiest way to install LIR is to use pip:

pip install lir

Usage

This repository offers both a Python API and a command-line interface.

Command-line interface

Evaluate an LR system using the command-line interface as follows:

  • define your data, LR system and experiments in a YAML file;
  • run lir <yaml file>.

The examples folder may be a good starting point for setting up an experiment.

The elements of the experiment configuration YAML are looked up in the registry. The following lists all available elements in the registry.

lir --list-registry

Datasets

There are currently a number of datasets implemented for this project:

Simulations

It is straightforward to simulate data for experimentation. Currently two very simple simulations synthesized_normal_binary and synthesized_normal_multiclass are available, with sources and measurements drawn from normal distributions.

Contributing / Development

Contributions are highly welcomed. If you'd like to contribute to the LiR package, please follow the steps as described in the CONTRIBUTING.md file.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts