Next-generation statistics engine for TDA

StableBear is built for statistics with topological data analysis (TDA). Typical TDA workloads run highly parallelized and reproducibly, and the results go straight into the tools you already use.

Read the docsInstall

The StableBear bear, sitting cross-legged

Install

pip install stablebear

Then import stablebear as sb and follow the documentation for examples.

Latest news

StableBear 0.5.1 released

Relative subsampling, Python 3.15 support and wheels for Windows on ARM64.

Read more

All news

  1. A StableBear PointCloudTensor of shape (3, 2) A block of six glass cells in 3 rows and 2 columns. Each cell is one tensor element holding its own point cloud: a circle, a torus, a sphere, three clusters, a helix and uniform noise.

    Point clouds in a tensor

    Point clouds of different sizes can be stored in the same tensor.

  2. A StableBear BarcodeTensor of shape (3, 2, 2) A block of glass cells, 3 rows by 2 columns by 2 deep. Each cell holds one persistence barcode. The front layer holds the H1 barcodes and the back layer the H0 barcodes of six point clouds: a circle, a torus, a sphere, three clusters, a helix and uniform noise.

    Barcodes for all of them

    Elementwise parallel computations using state-of-the-art algorithms.

  3. A StableBear PcfTensor of Betti curves, shape (3, 2, 2) A block of glass cells, 3 rows by 2 columns by 2 deep. Each cell holds one Betti curve, a step function drawn as a line. The front layer holds the H1 Betti curves and the back layer the H0 Betti curves of six point clouds: a circle, a torus, a sphere, three clusters, a helix and uniform noise.

    Persistence curves

    Transformations into Betti curves, stable ranks, etc.

Persistent homology guide

A point cloud of a blob and a noisy ring across the top and small clumps down the left. A chosen point at the right edge of the ring is marked; points near it are gold and turn grey with distance. In the bottom right corner, faint gold H0 stable rank curves of the samples and their bold pale mean.

Topological bootstrapping

Advanced bootstrapping capabilities allowing extraction of local and global topology in large datasets.

Relative subsampling tutorial

Two step functions stepping down to zero, one always above the other until both reach zero, each step drawn with a filled dot where it starts and an open dot where it ends, drawn over each other with the area between them split into rectangles at their steps, the first few from the left shaded, and beside them a 20 by 20 distance matrix shaded by distance, with a dark diagonal.

Exact representations

Functions are represented without discretization, and computations like distances and kernels are carried out exactly (up to machine precision). Large computations run on the GPU where available.

Distances guide

A step function that climbs unevenly to a peak and steps back down, sampled at twelve evenly spaced points, the twelve values as a column of cells shaded by size, and the cells wired into a small neural network with six hidden units and two outputs.

Into existing algorithms

Persistence curves become feature vectors, distance matrices or kernels for neural networks and other machine learning models.

PyTorch classifier tutorial