Changelog
This changelog includes end-user changes only. For internal development notes, see the repository changelog.
[5.1.0]
Changed
- Breaking change:
OnlineLowess.AddPointnow returns(PointResult, AddPointStatus, error)instead of(PointResult, bool, error). Usestatus == AddPointReady(orstatus.Ready()) for a smoothed value,AddPointFillingwhile the window is warming up, andAddPointDroppedwhenMissing = "drop"ignores a non-finite point. - Online fits sort the sliding window by
xbefore each update so non-monotonic streams stay correct. StreamingLowess.ProcessChunkrejects chunks that are not non-decreasing inxwhen merged with the previous overlap; feed ascending chunks or pre-sort the series.
Fixed
- Streaming no longer panics when derivatives were requested but missing; it returns an error instead.
- Extend/Zero boundary pads use unit spacing when leading/trailing
xties would otherwise stack pads. - Fixed retained-model
predict_handleownership sofree_resultno longer leaks or double-frees the handle; Go takes ownership viago_lowess_take_predict_handle. - Keep Go slice inputs alive across cgo calls, free native results with
defer, and makeClose/finalizer races safe with an atomic pointer swap. - Reject negative Streaming/Online
Iterationsat the native boundary instead of casting them to a huge unsigned count.
[5.0.0]
Added
- New Go module releases bundle the native header, CPU libraries for Linux/macOS/Windows on amd64 and arm64, dependency license notices, and checksums. Consumers no longer need separate native downloads or manual
CGO_CFLAGS/CGO_LDFLAGSsetup; cgo and a compatible C compiler are still required. - Enabled the optional wgpu DirectX 12 backend for GPU-enabled Windows builds. DXC is loaded dynamically with an FXC fallback, avoiding eager imports of
dxcompiler.dllanddxil.dll. - Added GLES for Android GPU builds with a target-scoped
wgpufeature; Windows continues to omit the GLES-only loader imports. - Added grouped
Outputs []string,CV *CVOptions, andIntervals *IntervalsOptionsfor fitting and prediction, including residual-bootstrap intervals for all adapters.
Changed
- Native linking now defaults to the bundled CPU library. Use
-tags=muslon musl Linux, or-tags=external_nativefor source-built, custom, or GPU libraries; the monorepo Make targets select external-native mode automatically. - Clarified that Batch
ResidualSDis1.4826 * MAD, while Streaming reports the cumulative sample standard deviation of emitted residuals. - Breaking change: replaced individual
Return*output fields withOutputs: []string{...}for Batch, Streaming, Online, and prediction options. - Breaking change: replaced flat interval/CV fields and nested CV seed with grouped options and one outer
Seed *uint64shared by fit-time CV and bootstrap.PredictOptionshas its ownSeedfor prediction-time bootstrap. - Represent unavailable diagnostic metrics as
niloptional values instead ofNaNsentinels.
Fixed
- Fixed CPU Gaussian standard errors for fitted and queried values to use the full unbounded kernel support.
- Made even-sample medians and mean-absolute residual scaling overflow-resistant for large finite values, and centered Batch/Streaming R-squared accumulation to preserve one-ULP response variation at large offsets.
- Made Batch RMSE, MAE, and R-squared reductions scale-safe for large finite values, preserved bisquare downweighting when tuned scales exceed the numeric range, and normalized custom weights before summation in local and all-tied fits.
- Kept AIC finite when raw residual-square sums overflow, and made local/all-tied WLS invariant to common scaling of large finite case weights.
- Reject explicitly empty custom weights instead of treating them as omitted.
- Fixed model finalizers potentially releasing native state during in-flight calls; model receivers are now kept alive until cgo calls return.
- Fixed unknown
Outputsnames being silently ignored andFitsilently ignoring extra custom-weight slices; invalid inputs now return errors. - Fixed k-fold CV silently coercing fold counts below two; active k-fold now rejects them while LOOCV continues to ignore
K. - Fixed the GPU installer selecting GNU/Linux artifacts on musl systems and accepting incompatible local archives; local archives now require a matching GPU feature, Go ABI major, platform, and architecture marker.
- Fixed Go
intoption and collection lengths narrowing at the C ABI boundary on 64-bit Windows. - Fixed global OLS fits treating predictor values with a large offset as degenerate; translated inputs now retain their fitted slope.
- Fixed fraction-1 global fits ignoring custom weights, including when Batch sorts observations by x.
- Fixed Batch
missing = "drop"accepting custom weights with a length different from the original input; weights are validated before rows are dropped. - Fixed standard errors for global weighted fits to account for observation weights and weighted prediction leverage.
- Fixed local Batch and retained-model prediction standard errors ignoring
custom_weights; local SE moments now include the per-observation case weights. - Fixed global fits with all-zero custom weights to honor the configured zero-weight fallback policy.
- Fixed fraction-1 global fits ignoring configured robustness iterations; they now reweight observations and report iterations used.
- Fixed Batch cross-validation candidate fits ignoring
custom_weights; K-fold CV now rejects more folds than observations instead of returning zero scores. - Fixed Streaming and Online accepting invalid
auto_convergetolerances; Online also rejects invalid explicitdeltavalues while retaining NaN as its default sentinel. - Fixed GPU Batch fits misaligning fitted values with unsorted inputs; results now preserve input and requested sorted order.
- Fixed GPU Batch silently ignoring
custom_weights; GPU fit and CV candidate kernels now apply them directly. - Reduced GPU adapter buffer requirements from 30 storage/32 total buffer bindings to 7 storage/8 total per shader stage by using per-compute-pipeline resource layouts.
- Fixed Online incremental mode accepting positive
deltaandauto_convergesettings it cannot use; unsupported combinations now error. - Fixed grouped intervals discarding distinct confidence and prediction levels; each requested coverage is now applied independently.
- Fixed the default
BoundaryPolicy("extend") letting synthetic boundary points bias the shared robustness scale estimate used to reweight every point, compounding across robustness iterations. - Improved agreement with R/Cleveland on sparse, asymmetric, and high-iteration fits by aligning robustness stopping, local-linear degeneracy handling, neighborhood traversal, delta interpolation, and weighted accumulation.
- Fixed zero-radius neighborhoods dropping tied observations or accumulating normalized weights in a different order under robust fits.
- Fixed Gaussian fits clipping the unbounded kernel to the neighbor window and flooring far-tail weights; all observations now contribute under the standard Gaussian formula.
4.1.0
Added
- Added musl release binaries for Go.
- Added
RetainModelandResult.PredictModel.Predict(newX, options)for prediction. - Added
ReturnDerivativetoOptions,StreamingOptions, andOnlineOptions. - Added standard errors and confidence/prediction intervals to
StreamingOptionsandOnlineOptions; online intervals requireUpdateMode = "full".
Changed
- Breaking change: the Go module import path now includes the required
/v4suffix; update imports using the old unsuffixed path.
Fixed
- Changed the
OnlineLowessdefaultiterationsfrom3to0, matching non-robust incremental updates; robustness iterations requireUpdateMode = "full".
4.0.0
Added
- Added
ReturnSortedtoOptions. - Added
MissingtoOptions,StreamingOptions, andOnlineOptionsto control non-finite input handling. - Added
fastlowess.InstallGPU()to download a prebuilt GPU library; GPU installers also accept a path to an existing local artifact. - Added prebuilt GPU artifacts for Linux and Windows ARM64.
Changed
- Breaking change:
OnlineOptionsno longer embedsOptions; removedReturnDiagnostics,ReturnResiduals,Parallel, andBackend. - Breaking change:
StreamingOptionsno longer embedsOptions; removed the inherited interval, standard-error, sorting, cross-validation, and backend fields. - Breaking change:
StreamingOptions.Overlapnow defaults dynamically tochunk_size / 10, clamped to[1, chunk_size - 10], rather than a fixed500. - Improved the Go API documentation, including the dynamic overlap default.
3.2.1
Added
- Added Linux and Windows ARM64 release binaries for Go.
Changed
- Clarified that results are returned in input order, even though the algorithm sorts internally.
Fixed
- Corrected the
OnlineOptionsdefaults toMinPoints = 2andUpdateMode = "incremental". - Fixed Windows ARM64 builds to target the host architecture rather than x64.
- Fixed Go module license metadata so pkg.go.dev recognizes the MIT and Apache-2.0 licenses.
3.2.0
- Initial release of the Go binding.