Repository navigation
v1.1.0
What's Changed
Performance
GP.predictcalls LAPACK's triangular solve directly instead of through scipy's wrapper layers (same numbers), broadcastssWinstead of tiling it, evaluates the mean function for all hyperparameter samples in one call and returns the squared-exponential diagonal without computing distances: about 1.5–1.7× faster per call at the sizes PyVBMC uses (#43).- The slice sampler's log-posterior evaluation builds the symmetric kernel matrix with
cdist, adds the noise in place on the diagonal, caches the hyperprior's type masks, and reuses the Cholesky factor when only mean-function hyperparameters move between evaluations: oneGP.fitabout 2–2.5× faster (#43). - Every numerical output is bit-identical to the previous release, checked over 2219 arrays of random GPs (every
predictbranch, both factorization regimes, three kernels, three mean functions, per-point noise, the rank-1 update, the Cholesky retry ladder,random_function, seeded fits) and by the PyVBMC and PyBADS test suites.
Features
rng=onGP.fit,SliceSampler,f_min_fillandGP.random_function: pass anumpy.random.Generator(or a seed) and the space-filling design and the sampler draw from it. The default keeps drawing from NumPy's global legacy stream, call for call as before. New modulegpyreg.rng(resolve_rng,random_integer).compute_batchedonZeroMean,ConstantMeanandNegativeQuadratic: the mean for all hyperparameter samples at once. A subclass that overridescomputealone keeps its behavior.
Bug Fixes
GP.log_likelihoodandGP.log_posteriorwithcompute_grad=TrueraisedTypeError; they return(value, gradient).
Notes
- The hyperprior's type masks are cached on the GP and reset by
set_priors,set_boundsandfit; change priors or bounds through those methods rather than by mutating the arrays in place. - A
SliceSamplercreated withoutrng=can be copied and pickled; the legacy stream is represented by a small picklable proxy.
Full Changelog: v1.0.4...v1.1.0