OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Data & Analytics

Pynomaly

PyNomaly is a Python 3 library implementing Local Outlier Probabilities (LoOP), a local-density method that scores how unusual each sample is relative to its nearest neighbors.

Independent OpenViST project profile, based on linked sources.

Pynomaly — Local rather than global density-based anomaly scoring
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use PyNomaly when observations should be assessed against their local neighborhoods and a normalized 0–1 LoOP score is useful for downstream review or analysis.

Who it is for

  • Python data analysts who need local-density outlier scores for records or observations.
  • Teams that want to rank samples for anomaly review or use scores as an input signal in a data-analysis pipeline.

Documented uses

  • Calculate a normalized outlier score for each row of a two-dimensional dataset.
  • Rank observations by their local deviation from neighboring samples.
  • Calculate scores relative to assigned clusters when data contains regions with different densities.
Before you choose

Requirements & limits

The project README provides pip and conda-forge installation commands and identifies the implementation as Apache 2.0 licensed.

  • The method relies on nearest-neighbor distances, and its results depend on neighborhood size and the extent parameter.
  • Feature normalization may be appropriate when dimensions have different scales.
  • Missing values must be handled before scoring.
  • Cluster labels can make local comparisons within clusters when the dataset contains regions of varying density.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install PyNomaly and calculate LoOP scores

Install the library, fit its LocalOutlierProbability model to a two-dimensional dataset, and retrieve sample scores.

Before you start

  • Python 3.8–3.14
  • A two-dimensional NumPy array or Pandas DataFrame without missing values
  • NumPy and python-utils; Numba and SciPy are optional dependencies

Steps

  1. Install with the command below or conda install conda-forge::pynomaly.

    Documented command
    pip install PyNomaly
  2. Import loop from PyNomaly and create a model with loop.LocalOutlierProbability(data).fit().

  3. Read the scores from m.local_outlier_probabilities.

Expected outcome

A LoOP score in the range 0–1 for each sample, interpretable as an outlier probability.

Guide limitations

  • Handle missing values before using the library.
  • Normalize data when feature scales differ, especially for multidimensional inputs.
  • The documented defaults are extent 3 and 10 neighbors; the number of neighbors must be greater than zero.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
20 November 2026
Original website title
vc1492a/PyNomaly · Official homepage title · retained in its source language