Skip to main content

Python package for Bayesian Change Point and Circular Binary Segmentation

Project description

Linear Segmentation

Build Status PyPI version Coffee

linear_segmentation using Bayesian Change Point Segmentation or Circular Binary segmentation.

Install

If you dont already have numpy and scipy installed, it is best to download Anaconda, a python distribution that has them included.

    https://continuum.io/downloads

Dependencies can be installed by:

    pip install -r requirements.txt

PyPI install, presuming you have all its requirements installed:

	pip install linear_segment

Usage

from linear_segment import segment
import numpy as np

# Create data
np.random.seed(10)
x = np.random.random(300000)
x[10000:20000] = x[10000:20000] + 0.1
x[25000:27000] = x[25000:27000] - 1
labels = np.repeat('a', len(x))

# Calculate segments
segments = segment(x, labels, method="online_both")
segments
segments = segment(x, labels, method="cbs")
segments

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linear_segment-1.0.0.tar.gz (262.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

linear_segment-1.0.0-cp310-cp310-macosx_13_0_x86_64.whl (265.5 kB view details)

Uploaded CPython 3.10macOS 13.0+ x86-64

File details

Details for the file linear_segment-1.0.0.tar.gz.

File metadata

  • Download URL: linear_segment-1.0.0.tar.gz
  • Upload date:
  • Size: 262.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.10 Darwin/22.1.0

File hashes

Hashes for linear_segment-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4fa5a9e6224a8f0dc8afa6b9f3eec7cfb19f23291815780e92c1cae2d727b01b
MD5 3f1786ce6d74de7ccc9ee909bb9e30d2
BLAKE2b-256 8f0d22e27810384e08687d033b065cfdf6ca13b42daf4a7fd9368790881be8d8

See more details on using hashes here.

File details

Details for the file linear_segment-1.0.0-cp310-cp310-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for linear_segment-1.0.0-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 55d78a2a2af795f70f8470c340bc536f1be91eb18076630c432fbfbe10df87d9
MD5 2a88807d47e862d33b4296ef9a1386d4
BLAKE2b-256 8933d9e671547c89f024a09007362d08007413344037c328ead5a3760cce660f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page