Releases: cameronbracken/corehydro
Release list
v0.13.0 -- the TimeSeries container
The heavy TimeSeries container -- the last unported portable slice of Numerics, and the one
four other members were waiting on. Numerics/Data/Time Series/TimeSeries.cs (2,334 lines) and
its Series base are ported, along with a DateTime value type that stands in for
System.DateTime (a corehydro addition: the calendar is what the container is built on, and the
core takes no external dependency). This closes branch port-time-series.
Added
- A time-series object in both packages. R gets
time_series()and 28ts_*()verbs over a
corehydro_tsclassed list; Python gets aTimeSeriesclass with the same operations as
methods -- the shapedistribution()/Distributionalready established. Between them they
reach the whole container: moving windows, cumulative sums and differences, the value
transformations, missing-value replacement and interpolation, date filling, clipping, shifting,
interval conversion, the summary and monthly statistics, the duration curve, the five block
series (withts_water_year()andts_calendar_year()by name), peaks over threshold, seasonal
decomposition, and two resamplers. - Dates are native in both languages. R takes and returns
POSIXctin UTC and also accepts
Date, ISO 8601 strings and epoch seconds; Python takes and returnsnumpy.datetime64and also
acceptsdatetime, a pandasDatetimeIndex, ISO strings and floats. Epoch seconds travel on
the wire, never .NET ticks -- a tick count near 6.3e17 is not exactly representable in a double,
while epoch seconds is exact for every interval the container supports. - A
timeseriestoolbox group, the nineteenth, plus four fixture files. One of them,
fixtures/timeseries/date_time.json, is what puts the portedDateTime-- which has no
upstream source file to be checked against -- permanently behind the dotnet oracle gate:
AddMonthsday-clamping, leap years, the fractional-AddDayssplit,DayOfYear,DayOfWeek
andToOADate. - Four members un-gated, each deferred with the container it needed: the seasonal
PointProcessModeldata path andGeneratePOTTimeSeries,DataFrame.CreateBlockSeriesand
CreatePeaksOverThresholdSeries(withExactData.DateTime), and the ARIMAX covariate
forecast-tail extension (CovariateExtension = "block_bootstrap"/"knn"). The seasonal point
process is reachable from both packages:analysis_data()takes dated observations and
model_point_process()takesseasonal/time_block/start_month. autocorrelation()accepts a time series in both packages.
Fixed
- The phase itself broke nothing and found four upstream behaviours instead (see below). The
documentation sweep that closed it did find one thing: worked example 04 pinnedmap_fitness
at473.558409617748, the value from before the v0.2.0 upstream sync moved MAP fitness onto
the log-likelihood scale as-473.558409617748. Both language pages were wrong and both
pipelines were green, because Quarto's freeze keys on the source file rather than on the
package the source calls, and notebooks are never re-executed. Every other page was audited by
forced re-execution and reproduces. - The documentation had accumulated scope claims that stopped being true as v0.9.0 through
v0.13.0 landed: five upstream example notebooks were still listed out of scope after being
ported,Data.Statisticswas marked partial when all thirteen of its classes are ported, and
seven example pairs said capabilities were unreachable thatmcmc_posterior(),
autocorrelation(),ml_jenks_breaks(),summary_statistics()andcorrelation()have
since made public.
Changed
- HEC-FDA is no longer listed as a porting target. It is being ported separately in
hecfda; the status page carries it as a related
effort instead of a planned upstream source. - The rendered site output (219 files: the
.htmlpages sitting beside their sources, their
*_files/figures, andsite_libs/) is no longer tracked.site/_freezestill is.
Notes
- Four upstream findings, each measured against the real compiled library, mirrored rather
than corrected, and written up indocs/upstream-csharp-issues.md:CumulativeSumsilently
drops the series' time interval; three indexed math overloads reach through an index their own
guard rejected while their seven siblings skip it;MovingAverage/MovingSumswap their
ArgumentExceptionarguments; and -- the consequential one --PointProcessModel's seasonal
day-of-year list comes out date-sorted while the likelihood pairs it positionally with the
caller's unsorted exact series, so a record not already in date order has each magnitude scored
against another event's day. - The
AutocorrelationTimeSeries overloads are still not ported, and that is now a
measurement rather than a severance. They are the same four bodies with a
missing-value-skipping mean, and the difference is not observable, because the lag-0
autocovariance sums over every observation. Driven against the real library, both overload
families return identical values on a clean series and all-NaN on a gappy one. - A seeded resampling run is bit-identical between R and Python, and
fixtures/timeseries/timeseries_cross_language.jsonasserts it at zero tolerance. Unlike the
callback layer's honest limit, every operation here happens inside the shared core, so this is a
guarantee rather than a best effort.
Both packages install from source and need a C++17 compiler.
pak::pak("cameronbracken/corehydro/corehydror@v0.13.0")pip install "git+https://github.com/cameronbracken/corehydro.git@v0.13.0#subdirectory=corehydropy"Validated against USACE-RMC Numerics 2.1.4 and RMC-BestFit 2.0.0. Full notes in
CHANGELOG.md;
documentation at https://cameronbracken.github.io/corehydro/.
v0.1.0-alpha
Changelog
All notable changes to corehydro (the shared C++ core, the corehydror R package, and
the corehydropy Python package) are documented here. The format follows
Keep a Changelog, and the project uses
semantic versioning. The three components are versioned together.
Unreleased
0.1.0 - 2026-07-11
First tagged release. Everything below is new.
Added
- Shared C++17 core with full parity to the USACE-RMC Numerics and RMC-BestFit C#
libraries (the probability, estimation, and analysis layers): all 42 univariate
distributions, multivariate distributions and seven bivariate copulas, eight MCMC
samplers (RWMH, ARWMH, DEMCz, DEMCzs, HMC, NUTS, Gibbs, SNIS) with Gelman-Rubin and
ESS diagnostics, bootstrap uncertainty, the MLE/MAP/Bayesian/GMM estimators, all
RMC-BestFit model families (flood frequency, Bulletin 17C, mixtures, competing risks,
point process, time series, spatial GEV, rating curves, bivariate/copula), the full
Analyses layer, and the Diagnostics layer (leverage, PSIS-LOO influence, prior
influence, predictive checks). See the porting status page for the exact scope. - R package
corehydrorand Python packagecorehydropy, thin bindings over
the same compiled core. A bit-exact Mersenne Twister port means seeded results are
identical across R, Python, and the upstream C# libraries. - Public distribution API: construct any of 38 families by name; density, CDF,
quantile, moments, L-moments, log-likelihood, seeded random generation, and fitting
by MLE, L-moments, or product moments. - Analysis functions (19 in each package):
univariate_analysis,
fit_distributions,bulletin17c_analysis, mixture/competing-risk/point-process/
composite/spatial-GEV analyses, AR/MA/ARIMA/ARIMAX time-series analyses, bivariate
and coincident-frequency analyses, rating curves, bootstrap uncertainty, predictive
checks, and estimation diagnostics. mcmc_sample(): direct MCMC over any distribution family (7 samplers) with
chains, acceptance rates, MAP, posterior summaries, R-hat, and ESS.- Statistics utilities: Multiple Grubbs-Beck low-outlier test, Box-Cox and
Yeo-Johnson transforms, plotting positions, Latin hypercube sampling. - Validation: a language-neutral oracle fixture suite consumed by C++, R, and
Python runners, plus a dev-only dotnet gate that replays every fixture against the
real C# libraries (4,100+ values reproduced, 0 failures). - Documentation site with worked examples in both languages ported from the
official Numerics-Python-Examples repository (11 example pairs, each ending in an
executable reproduction check against the upstream C# outputs), a Python API
reference (quartodoc), an R API reference (pkgdown), and a porting status page. - Developer tooling: pixi environment with tasks mirroring the Makefile targets,
GitHub Actions CI (3 OS matrix) and Pages deployment.
Changed
- Renamed from
bestfit(packagesbestfitr/bestfitpy) to corehydro
(corehydror/corehydropy), reflecting the goal of carrying code from both
USACE-RMC and HEC libraries in one package family.