linear-segment


Namelinear-segment JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/kylessmith/linear_segment
SummaryPython package for Bayesian Change Point and Circular Binary Segmentation
upload_time2023-05-04 20:42:12
maintainerKyle S. Smith
docs_urlNone
authorKyle S. Smith
requires_python>=3.10,<4.0
licenseGPL-2.0-or-later
keywords cython bayesian changepoint circular segment c
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Linear Segmentation

[![Build Status](https://travis-ci.org/kylessmith/bcpseg.svg?branch=master)](https://travis-ci.org/kylessmith/linear_segmentation) [![PyPI version](https://badge.fury.io/py/bcpseg.svg)](https://badge.fury.io/py/linear_segmentation)
[![Coffee](https://img.shields.io/badge/-buy_me_a%C2%A0coffee-gray?logo=buy-me-a-coffee&color=ff69b4)](https://www.buymeacoffee.com/kylessmith)

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

```python
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

```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kylessmith/linear_segment",
    "name": "linear-segment",
    "maintainer": "Kyle S. Smith",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "kyle.smith@stjude.org",
    "keywords": "cython,bayesian,changepoint,circular,segment,c",
    "author": "Kyle S. Smith",
    "author_email": "kyle.smith@stjude.org",
    "download_url": "https://files.pythonhosted.org/packages/3b/6d/1c3b34bfaae07f4a6b3a78078328e0e1f36f0b4608be1fac3f2ba67c311f/linear_segment-1.1.0.tar.gz",
    "platform": null,
    "description": "# Linear Segmentation\n\n[![Build Status](https://travis-ci.org/kylessmith/bcpseg.svg?branch=master)](https://travis-ci.org/kylessmith/linear_segmentation) [![PyPI version](https://badge.fury.io/py/bcpseg.svg)](https://badge.fury.io/py/linear_segmentation)\n[![Coffee](https://img.shields.io/badge/-buy_me_a%C2%A0coffee-gray?logo=buy-me-a-coffee&color=ff69b4)](https://www.buymeacoffee.com/kylessmith)\n\nlinear_segmentation using Bayesian Change Point Segmentation or Circular Binary segmentation.\n\n\n## Install\n\nIf you dont already have numpy and scipy installed, it is best to download\n`Anaconda`, a python distribution that has them included.  \n```\n    https://continuum.io/downloads\n```\n\nDependencies can be installed by:\n\n```\n    pip install -r requirements.txt\n```\n\nPyPI install, presuming you have all its requirements installed:\n```\n\tpip install linear_segment\n```\n\n## Usage\n\n```python\nfrom linear_segment import segment\nimport numpy as np\n\n# Create data\nnp.random.seed(10)\nx = np.random.random(300000)\nx[10000:20000] = x[10000:20000] + 0.1\nx[25000:27000] = x[25000:27000] - 1\nlabels = np.repeat('a', len(x))\n\n# Calculate segments\nsegments = segment(x, labels, method=\"online_both\")\nsegments\nsegments = segment(x, labels, method=\"cbs\")\nsegments\n\n```\n\n",
    "bugtrack_url": null,
    "license": "GPL-2.0-or-later",
    "summary": "Python package for Bayesian Change Point and Circular Binary Segmentation",
    "version": "1.1.0",
    "project_urls": {
        "Documentation": "https://www.biosciencestack.com/static/linear_segment/docs/index.html",
        "Homepage": "https://github.com/kylessmith/linear_segment",
        "Repository": "https://github.com/kylessmith/linear_segment"
    },
    "split_keywords": [
        "cython",
        "bayesian",
        "changepoint",
        "circular",
        "segment",
        "c"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "21ecd02585ae042781a53d3ef43f270b44197aff4148f2208a1a77e6b2243ca2",
                "md5": "25065b7f06086db62c6194c398364755",
                "sha256": "d2504e496453493b9523d5aefb300eb9263bb5445e8c65e86fb84bb5ee7d8ea6"
            },
            "downloads": -1,
            "filename": "linear_segment-1.1.0-cp310-cp310-macosx_13_0_x86_64.whl",
            "has_sig": false,
            "md5_digest": "25065b7f06086db62c6194c398364755",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.10,<4.0",
            "size": 265377,
            "upload_time": "2023-05-04T20:41:30",
            "upload_time_iso_8601": "2023-05-04T20:41:30.871370Z",
            "url": "https://files.pythonhosted.org/packages/21/ec/d02585ae042781a53d3ef43f270b44197aff4148f2208a1a77e6b2243ca2/linear_segment-1.1.0-cp310-cp310-macosx_13_0_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3b6d1c3b34bfaae07f4a6b3a78078328e0e1f36f0b4608be1fac3f2ba67c311f",
                "md5": "455a2902995bdf4a4a43ab3b3d7bfd20",
                "sha256": "99340f7958b636dfefdd6f04022e78819bdf6d8d057f9686509e09b253e379ee"
            },
            "downloads": -1,
            "filename": "linear_segment-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "455a2902995bdf4a4a43ab3b3d7bfd20",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 262255,
            "upload_time": "2023-05-04T20:42:12",
            "upload_time_iso_8601": "2023-05-04T20:42:12.920028Z",
            "url": "https://files.pythonhosted.org/packages/3b/6d/1c3b34bfaae07f4a6b3a78078328e0e1f36f0b4608be1fac3f2ba67c311f/linear_segment-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-04 20:42:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kylessmith",
    "github_project": "linear_segment",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "linear-segment"
}
        
Elapsed time: 0.07533s