Code Monkey home page Code Monkey logo

mosum-change-point-detection's Introduction

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.

mosum-change-point-detection's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.