Update to TensorFlow 2.13.x
- TensorFlow upgraded to ~=2.13.0
- as TF 2.13.0 ships with the arm64 macos wheels, the requirement of
tensorflow_macos
is removed
- Iason Krommydas for helping with the macos requirements for TF
- zfit broke for pydantic 2, which upgraded.
- restrict pydantic to <2.0.0
- support for Python 3.11, dropped support for Python 3.7
-fix longstanding bug in parameters caching
- update to TensorFlow 2.12
- removed tf_quant_finance
- fix a caching problem with parameters (could cause issues with larger PDFs as params would be "remembered" wrongly)
- more helpful error message when jacobian (as used for weighted corrections) is analytically asked but fails
- make analytical gradient for CB integral work
- array bandwidth for KDE works now correctly
- fixed uproot for Python 3.7 to <5
- @schmitse for reporting and solving the bug in the KDE bandwidth with arrays
last Python 3.7 version
SampleData
is not used anymore, aData
object is returned (for simple sampling). Thecreate_sampler
will still return aSamplerData
object though as this differs fromData
.
- Added support on a best-effort for human-readable serialization of objects including an HS3-like representation, find a `tutorial on serialization here<https://zfit-tutorials.readthedocs.io/en/latest/tutorials/components/README.html#serialization>`_. Most built-in unbinned PDFs are supported. This is still experimental and not yet fully supported. Dumping can be performed safely, loading maybe easily breaks (also between versions), so do not rely on it yet. Everything else - apart of trying to dump - should only be used for playing around and giving feedback purposes.
- allow uproot 5 (remove previous restriction)
- to Johannes Lade for the amazing work on the serialization, which made this HS3 implementation possible!
- added
extended
as a parameter to all PDFs: a PDF can now directly be extended without the need forcreate_extended
(orset_yield
). to_pandas
andfrom_pandas
now also support weights as columns. Default column name is""
.- add
numpy
andbackend
to options when setting the seed - reproducibility by fixing the seed in zfit is restored,
zfit.run.set_seed
now also sets the seed for the backend(numpy, tensorflow, etc.) if requested (on by default)
- Sebastian Schmitt @schmitse for reporting the bug in the non-reproducibility of the seed.
create_extended
addedNone
to the name, removed.SimpleConstraint
now also takes a function that has an explicitparams
argument.- add
name
argument tocreate_extended
. - adding binned losses would error due to the removed
fit_range
argument. - setting a global seed made the sampler return constant values, fixed (unoptimized but correct). If you ran a fit with a global seed, you might want to rerun it.
- histogramming and limit checks failed due to a stricter Numpy check, fixed.
- @P-H-Wagner for finding the bug in
SimpleConstraint
. - Dan Johnson for finding the bug in the binned loss that would fail to sum them up.
- Hanae Tilquin for spotting the bug with TensorFlows changed behavior or random states inside a tf.function, leading to biased samples whenever a global seed was set.
Hotfix for wrong import
- columns of unbinned
data
can be accessed with the obs like a mapping (like a dataframe) - speedup builtin
errors
method and make it more robust
Data
can no longer be used directly as an array-like object but got mapping-like behavior.- some old deprecated methods were removed
- improved caching speed, reduced tradeoff against memory
- yields were not added correctly in some (especially binned) PDFs and the fit would fail
- add jacobi (many thanks at @HansDembinski for the package)
- reduce the memory footprint on (some) fits, especially repetitive (loops) ones.
Reduces the number of cached compiled functions. The cachesize can be set with
zfit.run.set_cache_size(int)
and specifies the number of compiled functions that are kept in memory. The default is 10, but this can be tuned. Lower values can reduce memory usage, but potentially increase runtime.
- Enable uniform binning for n-dimensional distributions with integer(s).
- Sum of histograms failed for calling the pdf method (can be indirectly), integrated over wrong axis.
- Binned PDFs expected binned spaces for limits, now unbinned limits are also allowed and automatically
- converted to binned limits using the PDFs binning.
- Speedup sampling of binned distributions.
- add
to_binned
andto_unbinned
methods to PDF
- Justin Skorupa for finding the bug in the sum of histograms and the missing automatic conversion of unbinned spaces to binned spaces.
Public release of binned fits and upgrade to Python 3.10 and TensorFlow 2.9.
- improved data handling in constructors
from_pandas
(which allows now to have weights as columns, dataframes that are a superset of the obs) andfrom_root
(obs can now be spaces and therefore cuts can be direcly applied) - add hashing of unbinned datasets with a
hashint
attribute. None if no hash was possible.
- SimpleLoss correctly supports both functions with implicit and explicit parameters, also if they are decorated.
- extended sampling errored for some cases of binned PDFs.
ConstantParameter
errored when converted to numpy.- Simultaneous binned fits could error with different binning due to a missing sum over a dimension.
- improved stability in loss evaluation of constraints and poisson/chi2 loss.
- reduce gradient evaluation time in
errors
for many parameters. - Speedup Parameter value assignement in fits, which is most notably when the parameter update time is comparably large to the fit evaluation time, such as is the case for binned fits with many nuisance parameters.
- fix ipyopt was not pickleable in a fitresult
- treat parameters sometimes as "stateless", possibly reducing the number of retraces and reducing the memory footprint.
- nlopt and ipyopt are now optional dependencies.
- Python 3.10 added
- TensorFlow >= 2.9.0, <2.11 is now required and the corresponding TensorFlow-Probability version >= 0.17.0, <0.19.0
- @YaniBion for discovering the bug in the extended sampling and testing the alpha release
- @ResStump for reporting the bug with the simultaneous binned fit
- Save results by pickling, unpickling a frozen (
FitResult.freeze()
) result and usingzfit.param.set_values(params, result)
to set the values ofparams
.
- the default name of the uncertainty methods
hesse
anderrors
depended on the method used (such as 'minuit_hesse', 'zfit_errors' etc.) and would be the exact method name. New names are now 'hesse' and 'errors', independent of the method used. This reflects better that the methods, while internally different, produce the same result. To update, use 'hesse' instead of 'minuit_hesse' or 'hesse_np' and 'errors' instead of 'zfit_errors' or 'minuit_minos' in order to access the uncertainties in the fitresult. Currently, the old names are still available for backwards compatibility. If a name was explicitly chosen in the error method, nothing changed.
- KDE datasets are now correctly mirrored around observable space limits
- multinomial sampling would return wrong results when invoked multiple times in graph mode due to a non-dynamic shape. This is fixed and the sampling is now working as expected.
- increase precision in FitResult string representation and add that the value is rounded
- schmitse for finding and fixing a mirroring bug in the KDEs
- Sebastian Bysiak for finding a bug in the multinomial sampling
- Binned fits support, although limited in content, is here! This includes BinnedData, binned PDFs, and binned losses. TODO: extend to include changes/point to binned introduction.
- new Poisson PDF
- added Poisson constraint, LogNormal Constraint
- Save results by pickling, unpickling a frozen (
FitResult.freeze()
) result and usingzfit.param.set_values(params, result)
to set the values ofparams
.
- params given in ComposedParameters are not sorted anymore. Rely on their name instead.
norm_range
is now callednorm
and should be replaced everywhere if possible. This will break in the future.
- remove warning when using
rect_limits
or similar. - gauss integral accepts now also tensor inputs in limits
- parameters at limits is now shown correctly
- add TensorFlow 2.7 support
- fixate nlopt to < 2.7.1
- fixed a longstanding bug in the DoubleCB implementation of the integral.
- remove outdated deprecations
allow
FitResult
tofreeze()
, making it pickleable. The parameters are replaced by their name, the objects such as loss and minimizer as well.improve the numerical integration by adding a one dimensional efficient integrator, testing for the accuracy of multidimensional integrals. If there is a sharp peak, this maybe fails to integrate and the number of points has to be manually raised
add highly performant kernel density estimation (mainly contributed by Marc Steiner) in 1 dimension which allow for the choice of arbitrary kernels, support boundary mirroring of the data and allow for large (millions) of data samples: - :class:`~zfit.pdf.KDE1DimExact` for the normal density estimation - :class:`~zfit.pdf.KDE1DimGrid` using a binning - :class:`~zfit.pdf.KDE1DimFFT` using a binning and FFT - :class:`~zfit.pdf.KDE1DimISJ` using a binning and an algorithm (ISJ) to solve the optimal bandwidth
For an introduction, see either :ref:`sec-kernel-density-estimation` or the tutorial :ref:`sec-components-model`
add windows in CI
- the numerical integration improved with more sensible values for tolerance. This means however that some fits will
greatly increase the runtime. To restore the old behavior globally, do
for each instance
pdf.update_integration_options(draws_per_dim=40_000, max_draws=40_000, tol=1)
This will integrate regardless of the chosen precision and it may be non-optimal. However, the precision estimate in the integrator is also not perfect and maybe overestimates the error, so that the integration by default takes longer than necessary. Feel free to play around with the parameters and report back.
- Double crystallball: move a minus sign down, vectorize the integral, fix wrong output shape of pdf
- add a minimal value in the loss to avoid NaNs when taking the log of 0
- improve feedback when taking the derivative with respect to a parameter that a function does not depend on or if the function is purely Python.
- make parameters deletable, especially it works now to create parameters in a function only and no NameAlreadyTakenError will be thrown.
- add TensorFlow 2.6 support (now 2.5 and 2.6 are supported)
- Marc Steiner for contributing many new KDE methods!
- fix wrong arguments to
minimize
- make BaseMinimizer arguments optional
- make loss callable with array arguments and therefore combatible with iminuit cost functions.
- fix a bug that allowed FitResults to be valid that are actually invalid (reported by Maxime Schubiger).
- add Python 3.9 support
- upgrade to TensorFlow 2.5
- Scipy minimizers with hessian arguments use now
BFGS
as default
- remove Python 3.6 support
- boost-histogram
Update ipyopt requirement < 0.12 to allow numpy compatible with TensorFlow
- hotfix for wrong argument in exponential PDF
- removed requirement ipyopt, can be installed with
pip install zfit[ipyopt]
or by manually installingpip install ipyopt
- remove requirement of Ipyopt on MacOS as no wheels are available. This rendered zfit basically non-installable.
- fix loss failed for large datasets
- catch hesse failing for iminuit
Minor small fixes.
- add
loss
to callback signature that gives full access to the model - add :meth:`~zfit.loss.UnbinnedNLL.create_new` to losses in order to re-instantiate them with new models and data preserving their current (and future) options and other arguments
Release for fix of minimizers that performed too bad
- remove badly performing Scipy minimizers :class:`~zfit.minimize.ScipyTrustKrylovV1` and :class:`~zfit.minimize.ScipyTrustNCGV1`
- fix auto conversion to complex parameter using constructor
Added many new minimizers from different libraries, all with uncertainty estimation available.
- upgraded to TensorFlow 2.4
- Added many new minimizers. A full list can be found in :ref:`minimize_user_api`.
- :class:`~zfit.minimize.IpyoptV1` that wraps the powerful Ipopt large scale minimization library
- Scipy minimizers now have their own, dedicated wrapper for each instance such as :class:`~zfit.minimize.ScipyLBFGSBV1`, or :class:`~zfit.minimize.ScipySLSQPV1`
- NLopt library wrapper that contains many algorithms for local searches such as :class:`~zfit.minimize.NLoptLBFGSV1`, :class:`~zfit.minimize.NLoptTruncNewtonV1` or :class:`~zfit.minimize.NLoptMMAV1` but also includes more global minimizers such as :class:`~zfit.minimize.NLoptMLSLV1` and :class:`~zfit.minimize.NLoptESCHV1`.
- Completely new and overhauled minimizers design, including:
- minimizers can now be used with arbitrary Python functions and an initial array independent of zfit
- a minimization can be 'continued' by passing
init
tominimize
- more streamlined arguments for minimizers, harmonized names and behavior.
- Adding a flexible criterion (currently EDM) that will terminate the minimization.
- Making the minimizer fully stateless.
- Moving the loss evaluation and strategy into a LossEval that simplifies the handling of printing and NaNs.
- Callbacks are added to the strategy.
- Major overhaul of the
FitResult
, including:- improved
zfit_error
(equivalent ofMINOS
) minuit_hesse
andminuit_minos
are now available with all minimizers as well thanks to an great improvement in iminuit.- Added an
approx
hesse that returns the approximate hessian (if available, otherwise empty)
- improved
- upgrade to iminuit v2 changes the way it works and also the Minuit minimizer in zfit, including a new step size heuristic. Possible problems can be caused by iminuit itself, please report in case your fits don't converge anymore.
- improved
compute_errors
in speed by caching values and the reliability by making the solution unique. - increased stability for large datasets with a constant subtraction in the NLL
- NLL (and extended) subtracts now by default a constant value. This can be changed with a new
options
argument. COMPARISON OF DIFFEREN NLLs (their absolute values) fails now! (flag can be deactivated) - BFGS (from TensorFlow Probability) has been removed as it is not working properly. There are many alternatives such as ScipyLBFGSV1 or NLoptLBFGSV1
- Scipy (the minimizer) has been removed. Use specialized
Scipy*
minimizers instead. - Creating a
zfit.Parameter
, usignset_value
orset_values
now raises aValueError
if the value is outside the limits. Useassign
to suppress it.
- strategy to minimizer should now be a class, not an instance anymore.
zfit_error
moved only one parameter to the correct initial position. Speedup and more reliable.- FFTconv was shifted if the kernel limits were not symetrical, now properly taken into account.
- circumvent overflow error in sampling
- shuffle samples from sum pdfs to ensure uniformity and remove conv sampling bias
create_sampler
now samples immediately to allow for precompile, a new hook that will allow objects to optimize themselves.
- ipyopt
- nlopt
- iminuit>=2.3
- tensorflow ~= 2.4
- tensorflow-probability~=12
For devs: - pre-commit - pyyaml - docformatter
- Hans Dembinski for the help on upgrade to imituit V2
- Thibaud Humair for helpful remarks on the parameters
Update to fix iminuit version
- Fix issue when using a
ComposedParameter
as therate
argument of aPoisson
PDF
- require iminuit < 2 to avoid breaking changes
Upgrade to TensorFlow 2.3 and support for weighted hessian error estimation.
Added a one dimensional Convolution PDF
- upgrad to TensorFlow 2.3
- print parameter inside function context works now correctly
- Computation of the covariance matrix and hessian errors with weighted data
- Convolution PDF (FFT in 1Dim) added (experimental, feedback welcome!)
- TensorFlow==2.3 (before 2.2)
- tensorflow_probability==0.11
- tensorflow-addons # spline interpolation in convolution
- completely new doc design
- Minuit uses its own, internal gradient by default. To change this back, use
use_minuit_grad=False
minimize(params=...)
now filters correctly non-floating parameters.z.log
has been moved toz.math.log
(following TF)
- ncalls is not correctly using the internal heuristc or the ncalls explicitly
minimize(params=...)
automatically extracts independent parameters.- fix copy issue of KDEV1 and change name to 'adaptive' (instead of 'adaptiveV1')
- change exp name of
lambda_
to lam (in init) - add
set_yield
to BasePDF to allow setting the yield in place - Fix possible bug in SumPDF with extended pdfs (automatically)
- upgrade to iminuit>=1.4
- remove cloudpickle hack fix
Johannes for the docs re-design
Kernel density estimation for 1 dimension.
- add correlation method to FitResult
- Gaussian (Truncated) Kernel Density Estimation in one dimension
zfit.pdf.GaussianKDE1DimV1
implementation with fixed and adaptive bandwidth added as V1. This is a feature that needs to be improved and feedback is welcome - Non-relativistic Breit-Wigner PDF, called Cauchy, implementation added.
- change human-readable name of
Gauss
,Uniform
andTruncatedGauss
to remove the'_tfp'
at the end of the name
- fix color wrong in printout of results, params
- packaging: moved to pyproject.toml and a setup.cfg mainly, development requirements can
be installed with the
dev
extra as (e.g.)pip install zfit[dev]
- Fix shape issue in TFP distributions for partial integration
- change zfit internal algorithm (
zfit_error
) to compute error/intervals from the profile likelihood, which is 2-3 times faster than previous algorithm. - add
from_minuit
constructor toFitResult
allowing to create it when using directly iminuit - fix possible bias with sampling using accept-reject
- pin down cloudpickle version (upstream bug with pip install) and TF, TFP versions
- Python 3.8 and TF 2.2 support
- easier debugigng with
set_graph_mode
that can also be used temporarily with a context manager. False will make everything execute Numpy-like.
- added
get_params
to loss - fix a bug with the
fixed_params
when creating a sampler - improve exponential PDF stability and shift when normalized
- improve accept reject sampling to account for low statistics
- TensorFlow >= 2.2
(0.5.0 was skipped)
Complete refactoring of Spaces to allow arbitrary function. New, more consistent behavior with extended PDFs. SumPDF refactoring, more explicit handling of fracs and yields. Improved graph building allowing for more fine-grained control of tracing. Stabilized minimization including a push-back for NaNs.
Arbitrary limits as well as vectorization (experimental) are now fully supported. The new
Space
has an additional argument for a function that tests if a vector x is inside.To test if a value is inside a space,
Space.inside
can be used. To filter values,Space.filter
.The limits returned are now by default numpy arrays with the shape (1, n_obs). This corresponds well to the old layout and can, using
z.unstack_x(lower)
be treated likeData
. This has also some consequences for the output format ofrect_area
: this is now a vector.Due to the ambiguity of the name
limits
,area
etc (since they do only reflect the rectangular case) method with leadingrect_*
have been added (rect_limits
,rect_area
etc.) and are encouraged to be used.Extending a PDF is more straightforward and removes any "magic". The philosophy is: a PDF can be extended or not. But it does not change the fundamental behavior of functions.
SumPDF has been refactored and behaves now as follows: Giving in pdfs (extended or not or mixed) and fracs (either length pdfs or one less) will create a non-extended SumPDF using the fracs. The fact that the pdfs are maybe extended is ignored. This will lead to highly consistent behavior. If the number of fracs given equals the number of pdfs, it is up to the user (currently) to take care of the normalization. Only if all pdfs are extended and no fracs are given, the sumpdf will be using the yields as normalized fracs and be extended.
Improved graph building and
z.function
- the
z.function
can now, as withtf.function
, be used either as a decorator without arguments or as a decorator with arguments. They are the same as intf.function
, except of a few additional ones. zfit.run.set_mode
allows to set the policy for whether everything is run in eager mode (graph=False
), everything in graph, or most of it (graph=True
) or an optimized variant, doing graph building only with losses but not just models (e.g.pdf
won't trigger a graph build,loss.value()
will) withgraph='auto'
.- The graph cache can be cleaned manually using
zfit.run.clear_graph_cache()
in order to prevent slowness in repeated tasks.
- the
Switch for numerical gradients has been added as well in
zfit.run.set_mode(autograd=True/False)
.Resetting to the default can be done with
zfit.run.set_mode_default()
Improved stability of minimizer by adding penalty (currently in
Minuit
) as default. To have a better behavior with toys (e.g. never fail on NaNs but return an invalidFitResult
), use theDefaultToyStrategy
inzfit.mnimize
.Exceptions are now publicly available in
zfit.exception
Added nice printout for
FitResult
andFitResult.params
.get_params
is now more meaningful, returning by default all independent parameters of the pdf, including yields. Arguments (floating
,is_yield
) allow for more fine-grained control.
Multiple limits are now handled by a MultiSpace class. Each Space has only "one limit" and no complicated layout has to be remembered. If you want to have a space that is defined in disconnected regions, use the
+
operator or functionallyzfit.dimension.add_spaces
To extract limits from multiple limits,
MultiSpace
andSpace
are both iterables, returning the containing spaces respectively itself (for theSpace
case).SumPDF changed in the behavior. Read above in the Major Features and Improvement.
Integrals of extended PDFs are not extended anymore, but
ext_integrate
now returns the integral multiplied by the yield.
ComposedParameter
takes nowparams
instead ofdependents
as argument, it acts now as the arguments to thevalue_fn
. To stay future compatible, create e.g.def value_fn(p1, pa2)
and usingparams = ['param1, param2]
,value_fn
will then be called asvalue_fn(param1, parma2)
.value_fn
without arguments will probably break in the future.FitResult.error
has been renamed toerrors
to better reflect that multiple errors, the lower and upper are returned.
- fix a (nasty, rounding) bug in sampling with multiple limits
- fix bug in numerical calculation
- fix bug in SimplePDF
- fix wrong caching signature may lead to graph not being rebuild
- add
zfit.param.set_values
method that allows to set the values of multiple parameters with one command. Can, as theset_value
method be used with a context manager. - wrong size of weights when applying cuts in a dataset
with_coords
did drop axes/obs- Fix function not traced when an error was raised during first trace
- MultipleLimits support for analytic integrals
zfit.param.set_values(..)
now also can use aFitResult
asvalues
argument to set the values from.
- added a new error method, 'zfit_error' that is equivalent to 'minuit_minos', but not fully stable. It can be used with other minimizers as well, not only Minuit.
- remove the outdated typing module
- add tableformatter, colored, colorama for colored table printout
- Johannes Lade for code review and discussions.
- Hans Dembinski for useful inputs to the uncertainties.
- refactor
hesse_np
with covariance matrix, make it available to all minimizers
- fix bug in
hesse_np
- Refactoring of the Constraints, dividing into
ProbabilityConstraint
that can be sampled from and more general constraints (e.g. for parameter boundaries) that can not be sampled from. - Doc improvements in the constraints.
- Add
hesse
error method ('hesse_np') available to all minimizers (not just Minuit).
- Changed default step size to an adaptive scheme, a fraction (1e-4) of the range between the lower and upper limits.
- Add
use_minuit_grad
option to Minuit optimizer to use the internal gradient, often for more stable fits - added experimental flag
zfit.experimental_loss_penalty_nan
, which adds a penalty to the loss in case the value is nan. Can help with the optimisation. Feedback welcome!
Release to keep up with TensorFlow 2.1
- Fixed the comparison in caching the graph (implementation detail) that leads to an error.
This release switched to TensorFlow 2.0 eager mode. In case this breaks things for you and you need urgently a running version, install a version < 0.4.1. It is highly recommended to upgrade and make the small changes required.
Please read the upgrade guide <docs/project/upgrade_guide.rst>
on a more detailed explanation how to upgrade.
TensorFlow 2.0 is eager executing and uses functions to abstract the performance critical parts away.
Dependents (currently, and probably also in the future) need more manual tracking. This has mostly an effect on CompositeParameters and SimpleLoss, which now require to specify the dependents by giving the objects it depends (indirectly) on. For example, it is sufficient to give a
ComplexParameter
(which itself is not independent but has dependents) to aSimpleLoss
as dependents (assuming the loss function depends on it).ComposedParameter
does no longer allow to give a Tensor but requires a function that, when evaluated, returns the value. It depends on thedependents
that are now required.Added numerical differentiation, which allows now to wrap any function with
z.py_function
(zfit.z
). This can be switched on withzfit.settings.options['numerical_grad'] = True
Added gradient and hessian calculation options to the loss. Support numerical calculation as well.
Add caching system for graph to prevent recursive graph building
changed backend name to
z
and can be used aszfit.z
or imported from it. Added:function
decorator that can be used to trace a function. Respects dependencies of inputs and automatically caches/invalidates the graph and recreates.py_function
, same astf.py_function
, but checks and may extends in the futuremath
module that contains autodiff and numerical differentiation methods, both working with tensors.
- EDM goal of the minuit minimizer has been reduced by a factor of 10 to 10E-3 in agreement with the goal in RooFits Minuit minimizer. This can be varied by specifying the tolerance.
- known issue: the
projection_pdf
has troubles with the newest TF version and may not work properly (runs out of memory)
- added numdifftools (for numerical differentiation)
This is a legacy release to add some fixes, next release is TF 2 eager mode only release.
- mostly TF 2.0 compatibility in graph mode, tests against 1.x and 2.x
get_depentents
returns now an OrderedSet- errordef is now a (hidden) attribute and can be changed
- fix bug in polynomials
- added ordered-set
Special release for conda deployment and version fix (TF 2.0 is out)
This is the last release before breaking changes occur
- added ConstantParameter and
zfit.param
namespace- Available on conda-forge
- an implicitly created parameter with a Python numerical (e.g. when instantiating a model) will be converted to a ConstantParameter instead of a fixed Parameter and therefore cannot be set to floating later on.
- added native support TFP distributions for analytic sampling
- fix Gaussian (TFP Distribution) Constraint with mixed up order of parameters
from_numpy
automatically converts to default float regardless the original numpy dtype,dtype
has to be used as an explicit argument
- TensorFlow >= 1.14 is required
- Chris Burr for the conda-forge deployment
This is the last release before breaking changes occur
- create
Constraint
class which allows for more fine grained control and information on the applied constraints. - Added Polynomial models
- Improved and fixed sampling (can still be slightly biased)
None
- fixed various small bugs
for the contribution of the Constraints to Matthieu Marinangeli <matthieu.marinangeli@cern.ch>
Fixed Partial numeric integration
Bugfixes mostly, a few major fixes. Partial numeric integration works now.
- Bugfixes
- data_range cuts are now applied correctly, also in several dimensions when a subset is selected (which happens internally of some Functors, e.g. ProductPDF). Before, only the selected obs was respected for cuts.
- parital integration had a wrong take on checking limits (now uses supports).
With 0.3.2, bugfixes and three changes in the API/behavior
- tfp distributions wrapping is now different with dist_kwargs allowing for non-Parameter arguments (like other dists)
- sampling allows now for importance sampling (sampler in Model specified differently)
model.sample
now also returns a tensor, being consistent withintegrate
- shape handling of tfp dists was "wrong" (though not producing wrong results!), fixed. TFP distributions now get a tensor with shape (nevents, nobs) instead of a list of tensors with (nevents,)
- refactor the sampling for more flexibility and performance (less graph constructed)
- allow to use more sophisticated importance sampling (e.g. phasespace)
- on-the-fly normalization (experimentally) implemented with correct gradient
Minor improvements and bugfixes including:
- improved importance sampling allowing to preinstantiate objects before it's called inside the while loop
- fixing a problem with
ztf.sqrt
Beta stage and first pip release
- First creation of the package.