Skip to main content

UniDip Python Port

See reference paper: http://www.kdd.org/kdd2016/subtopic/view/skinny-dip-clustering-in-a-sea-of-noise

UniDip is a noise robust clustering algorithm for 1 dimensional numeric data. It recursively extracts peaks of density in the data utilizing the Hartigan Dip-test of Unimodality.

Install

coming soon...

pip3.6 install unidip

Examples

Basic Usage

from unidip import UniDip

# create bi-modal distribution
dat = np.concatenate([np.random.randn(200)-3, np.random.randn(200)+3])

# sort data so returned indices are meaningful
dat = np.msort(dat)

# get start and stop indices of peaks 
intervals = UniDip(dat).run()

Advanced Options

  • alpha: control sensitivity as p-value. Default is 0.05. increase to isolate more peaks with less confidence. Or, decrease to isolate only peaks that are least likely to be noise.
  • mrg_dst: Defines how close intervals must be before they are merged.
  • ntrials: how many trials are run in Hartigan Dip Test more trials adds confidance but takes longer.
intervals = UniDip(dat, alpha=0.001, ntrials=1000, mrg_dst=5).run()

Release files for unidip 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unidip 0.1.1
File Size Uploaded
unidip-0.1.1.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for unidip 0.1.1
File Interpreter ABI Platform
unidip-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.9 kB

Release files / unidip-0.1.1.tar.gz

Download URL unidip-0.1.1.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ec62dd0f753923e89bcb870e63ce7d3c4c92eb2ebbd91c84f658ef4358fd1d01
BLAKE2b-256 checksum
How to use checksums
1c22e2b39fd524297ecc6c439748c4e20d56a97a8829f2b2b1897365a0f23a19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / unidip-0.1.1-py3-none-any.whl

Download URL unidip-0.1.1-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4cd76b9ff9924efade07108798d50ed5dcca2a92bf9ab4c8bf1170fb4caf780d
BLAKE2b-256 checksum
How to use checksums
793751df0a51cfb715bbee7f0a3a51f0414bfd5e47ff0052cf4d86f7cf4c9d5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page