Skip to content

Latest commit

Β 

History

History
75 lines (53 loc) Β· 3.34 KB

File metadata and controls

75 lines (53 loc) Β· 3.34 KB

ruptures

A Go re-implementation of change point detection algorithms, inspired by the Python library ruptures.

🚧 This project is in early development. APIs and module structure are subject to change.

✨ Overview

This library provides a modular implementations of change point detection algorithms such as:

  • PELT (Pruned Exact Linear Time)
  • Binary Segmentation
  • Bottom-Up Segmentation
  • Window-based approaches

It also includes cost functions (L1, L2, RBF, entropy) and metric evaluation utilities. The goal is to offer a fast, type-safe, and embeddable library in Go for time series segmentation and signal analysis.

πŸ“¦ Features

  • Idiomatic Go architecture
  • Clean separation between cost functions and detection methods
  • Fully compatible with custom input pipelines
  • Suitable for CLI tools, web backends, or embedded systems

πŸ”§ Project Layout

Estructura propuesta en Go, inspirada en la modularidad de ruptures:

rupture/
β”œβ”€β”€ cmd/                  # CLI para probar, correr, exportar resultados
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ base/             # Interfaces clave: CostFunction, Estimator
β”‚   β”œβ”€β”€ cmdutils/         # 
β”‚   β”œβ”€β”€ cost/             # Costos L1, L2, RBF... testables de forma independiente
β”‚   β”œβ”€β”€ datasets/         # SimulaciΓ³n de seΓ±ales (‘útil para tests!)
β”‚   β”œβ”€β”€ detection/        # Algoritmos separados por carpeta = πŸ’―
β”‚   └── exceptions/       # `ErrInvalidSegment`, `ErrIncompatibleCost`, etc.
β”‚   └── kernels/          # Base para libreria autonoma: pykernels port
β”‚   └── linalg/           # utilerias de Gonum / Algebra lineal : shotcuts, envoltorios
β”‚   └── stat/             # utilerias de Gonum / Stats: shotcuts, envoltorio + scypy portss
β”‚   β”œβ”€β”€ metrics/          # Precision, coverage, F1, etc.
β”‚   β”œβ”€β”€ types/            # 
β”‚   β”œβ”€β”€ utils/            # Funciones como `SanityCheck()`, padding, slicing...
β”œβ”€β”€ docs/                 # Herramientas para generacion de documentacion / RAG
β”œβ”€β”€ go.mod                # Manejo de dependencias limpio
β”œβ”€β”€ README.md             # Main page
β”œβ”€β”€ license               # LICENSE
β”œβ”€β”€ plan.md               # Roadmap de implementaciΓ³n, dependencias, etc.
└── logbook.md            # Registro de decisiones, experimentos o insights

🏁 Goals

  • Port the core of ruptures to Go in idiomatic style
  • Enable Go-native change point detection for scientific, industrial, and embedded applications
  • Provide test coverage and validation against ruptures outputs
  • Add statistical utilities and non-parametric tests in the long term

πŸ“š Background

This project was inspired by ruptures, a Python library authored by Charles Truong and contributors, released under a BSD 3-Clause License.

While this project does not copy code from ruptures, it reimplements similar concepts and algorithmic structure. We gratefully acknowledge their work as the conceptual foundation of this library.

πŸ“„ License

See the LICENSE file for details.

🀝 Contributions

Contributions are welcome! If you're interested in joining the effort or adapting statistical algorithms to Go, feel free to open an issue or pull request.