본문 바로가기
Data Science/Portfolio

[Kaggle] Change Point Detection | 시계열 변화하는 포인트 탐지

by yejining99 2023. 1. 10.

오늘 kaggle한테 이메일이 왔는데,

그 내용은 내가 예전에 올린 kaggle notebook중 하나가 1000 view를 넘겼다는 것이었다!

한 1년전에 올린 posting인데, 1000명이 봤다니 약간 조금 뿌듯 😸

그래서 어떤 내용을 올렸는지 간단히 소개해보겠다.


Kaggle 링크

https://www.kaggle.com/code/yejining99/change-point-detection

 

🔎📈Change Point Detection

Explore and run machine learning code with Kaggle Notebooks | Using data from No attached data sources

www.kaggle.com

 

어떤 내용?

CPD(Change Point Detection)는 시계열 데이터 안에 급격한 변화를 찾는 문제이다.

이것은 현실 세계에서 매우 빈번하게 일어날 수 있는데,

집중력 상실, 주행 조건 변화, 기후 변화, 재고 감소 등의 순간을 감지하는 것이 예가 될 수 있다.

Ruptures package

이러한 변화하는 포인트를 탐지하기 하기 위해 ruptures라는 library 사용했다.

ruptures는 파이썬을 사용하여 변경점 알고리즘을 수행하도록 설계되었다.
이 라이브러리에는 Python >=3.6 및 numpy, scipy, matplotlib 패키지가 필요하다.

https://centre-borelli.github.io/ruptures-docs/

 

Welcome to ruptures - ruptures

Welcome to ruptures ruptures is a Python library for off-line change point detection. This package provides methods for the analysis and segmentation of non-stationary signals. Implemented algorithms include exact and approximate detection for various para

centre-borelli.github.io

 

알고리즘

ruptures에서는 다양한 변경점 찾기 알고리즘을 제공해준다.

1. Dynamic programming (Dynp)

2. Linearly penalized segmentation (Pelt)

3. Binary segmentation (Binseg)

4. Bottom-up segmentation (BottomUp)

 

각각의 방법을 어떻게 사용하는지는 위의 kaggle notebook링크에서 찾아보면 좋을 것 같다.