mosum.py: Moving Sum Based Procedures for Changes in the Mean
A python port of the R package mosum https://CRAN.R-project.org/package=mosum. Implementations of MOSUM-based statistical procedures and algorithms for detecting multiple changes in the mean. This comprises the MOSUM procedure for estimating multiple mean changes from Eichinger and Kirch (2018) doi:10.3150/16-BEJ887 and the multiscale algorithmic extension from Cho and Kirch (2022) doi:10.1007/s10463-021-00811-5, as well as the bootstrap procedure for generating confidence intervals about the locations of change points as proposed in Cho and Kirch (2022) doi:10.1016/j.csda.2022.107552. See also Meier, Kirch and Cho (2021) doi:10.18637/jss.v097.i08 which accompanies the R package.
Installation
$ pip install mosum
Quick start
mosum.py can be used as follows to detect changes in the mean of a time series
import mosum
# simulate data
xx = mosum.testData("blocks")["x"]
# detect changes
xx_m = mosum.mosum(xx, G = 50, criterion = "eta", boundary_extension = True)
# summary and print methods
xx_m.summary()
xx_m.print()
# plot the output
xx_m.plot(display="mosum")
from matplotlib import pyplot as plt
plt.show()
Usage
See usage for a detailed description of how to use the package.
License
mosum.py was created by Dom Owens, based on the R package "mosum", originally by Alexander Meier, Haeran Cho, and Claudia Kirch. It is licensed under the terms of the MIT license.
Metadata
Release files for mosum 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mosum-0.2.0.tar.gz | 23.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mosum-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.8 kB
Release files / mosum-0.2.0.tar.gz
| Download URL | mosum-0.2.0.tar.gz |
|---|---|
| Size | 23.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d85bef80eb75990dfcf776c81a25a190654a2aba67a59da963a138e725e9572d
|
|
BLAKE2b-256 checksum How to use checksums |
7210de966b4e34287c842f31978b75e81d685fa32f327ebeeb98c3ef6a6760a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.9.16 Linux/5.4.0-137-generic
|
Release files / mosum-0.2.0-py3-none-any.whl
| Download URL | mosum-0.2.0-py3-none-any.whl |
|---|---|
| Size | 28.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2b2ee2de33532575599941ed13ec13416ca4df09d502f2de24ecc230e75fa41
|
|
BLAKE2b-256 checksum How to use checksums |
121b8bef051dd14a5b7eee5169c66e31328f66bccec8c2e1e03d5863272af600
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.9.16 Linux/5.4.0-137-generic
|