Skip to content

aakritixyz/gfpop-learning-tests

Repository files navigation

GFPOP Learning Tests

This repository contains learning experiments and test scripts for the GFPOP R package, focusing on changepoint detection and graph visualization. Each script creates a small GFPOP graph, runs it on example datasets, and saves the resulting plots as PNG images.

These experiments were created while exploring the GFPOP package for GSoC 2026 preparation.

Repository Contents • graph1.R – First GFPOP graph test script • graph2.R – Second GFPOP graph test script • graph3.R – Third GFPOP graph test script • graph_two_state.R – Two-state GFPOP graph example • gfpop_changepoint_plot_20260110.R.R – Example changepoint detection script using multiple datasets • gfpop_changepoints_multidata.R.R – Script to run GFPOP on multiple datasets and save plots • *.png – PNG images generated by the scripts showing the GFPOP graphs and changepoints • README.md – This file, explaining the repo contents and usage

Usage 1. Install required packages in R: install.packages("gfpop") install.packages("ggplot2") install.packages("igraph") 2. Open R or RStudio 3. Run a script, for example: source("graph1.R") # Replace with any script file 4. Output:

•	The script will generate a GFPOP plot for the defined data and graph.
•	The plot is automatically saved as a PNG file in the repository (or in the specified folder like GFPOP_results/).

Examples

Example of running a GFPOP changepoint detection script with multiple datasets: source("gfpop_changepoints_multidata.R.R")

This will: • Create GFPOP graphs for each dataset • Detect changepoints • Save plots like gfpop_test1_changepoints.png, gfpop_test2_changepoints.png, etc.

About GFPOP

GFPOP (Generalized Functional Pruning Optimal Partitioning) is an R package for changepoint detection with constrained models. • Useful for segmenting time series data • Can model multiple states with penalties and decay • Supports multiple loss types (mean, variance, Poisson, etc.)

This repository is intended for learning and experimentation, not for production use.

Notes • All scripts are self-contained and can be run directly in R or RStudio. • PNG files are saved automatically; ensure the folder path exists or adjust the path in the script. • Scripts use small example datasets for testing purposes.

About

Small learning experiments based on the GFPOP wiki, created while exploring the project for GSoC 2026.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages