Skip to content

add unconstrained Poisson FPOP and isotonic Normal FPOP solvers - #24

Open
williamzhang7792 wants to merge 6 commits into
tdhock:masterfrom
williamzhang7792:master
Open

williamzhang7792 wants to merge 6 commits into
tdhock:masterfrom
williamzhang7792:master

Conversation

@williamzhang7792

Copy link
Copy Markdown
Contributor

Two new FPOP solvers for the GSoC 2026 gfpop tests:

  • PoissonFPOPunconstrained: unconstrained optimal partitioning (Poisson loss). Collapses the 2-state up/down model to 1 state, replaces monotonicity operators with set_to_unconstrained_min_of. Validated against Segmentor3IsBack::Segmentor(model=1).
  • NormalFPOPisotonic: regularized isotonic regression (Normal loss). Uses set_to_min_less_of for non-decreasing constraint. NormalLossPiece inherits from a shared LossPiece base class alongside PoissonLossPieceLog. Validated against isoreg() (penalty=0) and fpop::Fpop().

New files: src/PoissonFPOPunconstrained.{cpp,h}, src/NormalFPOPisotonic.{cpp,h}, src/LossPiece.h, R/PoissonFPOPunconstrained.R, R/NormalFPOPisotonic.R, man/PoissonFPOPunconstrained.Rd, man/NormalFPOPisotonic.Rd, tests/testthat/test-PoissonFPOPunconstrained.R (28 tests), tests/testthat/test-NormalFPOPisotonic.R (17 tests).

Modified: src/funPieceListLog.{h,cpp} (added set_to_unconstrained_min_of), src/interface.cpp (registered new C entry points), README.org.

Passes R CMD check --no-manual with no new warnings.

Medium test: PoissonFPOPunconstrained -- unconstrained optimal
partitioning with Poisson loss, using a new
set_to_unconstrained_min_of method on PiecewisePoissonLossLog.

Hard test: NormalFPOPisotonic -- regularized isotonic regression
with Normal loss, using NormalLossPiece (inherits from LossPiece
base class) and set_to_min_less_of for the non-decreasing constraint.

Both solvers use the package's .C() API (no Rcpp). Includes R
wrappers, man pages, and testthat suites (45 tests total).
When the unconstrained Fpop solution is already non-decreasing,
the isotonic solver should give the same result.
new solvers, quick start, and file list at the top for reviewer orientation
@tdhock

tdhock commented Mar 11, 2026

Copy link
Copy Markdown
Owner

can you please submit another PR which converts CI to github actions, so we can see if the tests pass here?

@williamzhang7792

Copy link
Copy Markdown
Contributor Author

can you please submit another PR which converts CI to github actions, so we can see if the tests pass here?

CI PR is up: #25

should be good to go once merged, then checks will run here automatically. happy to make any changes if needed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants