Skip to content

cwindolf/isosplit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

isosplit

a numpy implementation of J. Magland and A. Barnett, Unimodal clustering using isotonic regression: ISO-SPLIT.

there is a much (about 10x) faster Python wrapper of the C++ implementation by those authors here, which should be preferred over this implementation in all cases, although maybe the additional exported functionality here could be useful. for Matlab, see the official implementation.

this repository is unofficial and in no way endorsed by those authors. this code is (or, claims to be) a direct translation to Python of the Matlab implementation. results look similar to the Python C++ wrapper, but are slightly different, probably due to small implementation differences.

demo / usage

run pip install -e . in this directory, and then check out the demo notebook in demo/.

up-down isotonic regression

this module also exports functions up_down_isotonic_regression and down_up_isotonic_regression. these are translations of the original authors' least squares up-down isotonic regression subroutine, which adapts the Pool-Adjacent-Violators algorithm from the usual isotonic regression setting. relies on a fast Cython implementation of PAV in jisotonic5.pyx, which is a very direct translation of the original corresponding C++ file.

isosplit1d

this is my own personal riff on what can be done with the isocut primitive to solve the clustering problem for one-dimensional data. the idea is to fix a threshold for the dip score statistic and recursively split the data until there are no remaining significant cuts. optional parameters for minimum cluster size and minimum spatial extent of clusters are also included, and the discovered cut points which divide the spatial domain are returned so that they can be used for extrapolation.

exported as isosplit1d, see isosplit/isosplit1d.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published