Releases: peterhurford/squigglepy
Releases · peterhurford/squigglepy
Release list
0.30
- [Breaking change] Adds support for Python 3.13 and 3.14, drops support for Python 3.9 and 3.10.
- [Breaking change] Removed
roll_dieandflip_coinfunctions. Usesq.die(sides) @ nor~sq.coin()instead. - Integration test timing checks no longer warn when a test runs faster than its baseline — only slower-than-baseline deviations are flagged.
- Added
die(sides, explode_on=None)andcoin()as distribution objects for dice and coins. These support all distribution operations like~,@,+,-, etc. Thediedistribution also supports "exploding dice" mechanics via theexplode_onparameter. - Added
dirichlet(alpha)distribution, a multivariate generalization of the beta distribution that samples a probability vector summing to 1. - Added documentation for model functions and
sq.samplein README. - Uses prettier
tqdmoutput that is now aware of Jupyter notebooks. bayes.updatenow supportslognormandgammadistributions in addition tonormandbeta.- Allow
zero_inflatedto accept 0 or 1 as probabilities.
v0.29
- Fixes a bug where
max_gainandmodeled_gainwere incorrect in kelly output. - Fixes a bug where
errorwas not correctly passed fromhalf_kelly,third_kelly, andquarter_kelly. - Added
invlognormas a new distribution. - Added
bucket_percentagesto more easily get the percentage of values within a bucket. - Added
third_kellyas an alias forkellywith deference = 0.66. (TODO: Fix tests) - Allows Bernoulli distributions to be defined with p=0 or p=1
- Added a
Makefileto help simplify testing and linting workflows
v0.28
v0.28
- [Breaking change]
sq.paretopreviously sampled from a Lomax distribution due to a complication with numpy. Now it properly samples from a Pareto distribution. - [Breaking change] lclip / rclip have been removed from triangular distribution because that doesn't make sense.
- [Breaking change] You now can nest mixture and discrete distributions within mixture distributions.
- [Breaking change]
sq.kellynow raises an error if you put in a price below the market price. You can passerror=Falseto disable this and return to the old behavior. - Added
pertdistribution. - Added
sharpe_ratioto utilities. get_percentiles,get_log_percentiles,get_mean_and_ci, andget_median_and_cinow can all take an optionalweightsparameter to do a weighted version.
v0.27
v0.27
- [Breaking change] This package now only supports Python 3.9 and higher.
- [Breaking change]
get_percentilesandget_log_percentilesnow always return a dictionary, even if there's only one element. - [Breaking change]
.typeis now removed from distribution objects. - [Breaking change] You now can nest mixture distributions within mixture distributoins.
- You can now create correlated variables using
sq.correlate. - Added
geometricdistribution. - Distribution objects now have the version of squigglepy they were created with, which can be accessed via
obj._version. This should be helpful for debugging and noticing stale objects, especially when squigglepy distributions are stored in caches. - Distributions can now be hashed with
hash. - Fixed a bug where
tdistwould not return multiple samples if defined withtalone. - Package load time is now ~2x faster.
- Mixture sampling is now ~2x faster.
- Pandas and matplotlib as removed as required dependencies, but their related features are lazily enabled when the modules are available. These packages are still available for install as extras, installable with
pip install squigglepy[plots](for plotting-related functionality, matplotlib for now),pip install squigglepy[ecosystem](for pandas, and in the future other related packages), orpip install squigglepy[all](for all extras). - Multicore distribution now does extra checks to avoid crashing from race conditions.
- Using black now for formatting.
- Switched from
flake8toruff.
v0.26
v0.26
lognormcan now be defined either referencing the mean and sd of the underlying normal distribution vianorm_mean/norm_sdor via the mean and sd of the lognormal distribution itself vialognorm_mean/lognorm_sd. To further disambiguate,meanandsdare no longer variables that can be passed tolognorm.
v0.25
v0.25
- Added
plotas a method to more easily plot distributions. - Added
dist_loganddist_expoperators on distributions. - Added
growth_rate_to_doubling_timeanddoubling_time_to_growth_rateconvenience functions. These take numbers, numpy arrays or distributions. - Mixture distributions now print with weights in addition to distributions.
- Changes
get_log_percentilesto report in scientific notation. bayesnow supports separate arguments formemcache_loadandmemcache_saveto better customize how memcache behavior works.memcacheremains a parameter that sets bothmemcache_loadandmemcache_saveto True.
v0.24
v0.24
- Distributions can now be negated with
-(e.g.,-lognorm(0.1, 1)). - Numpy ints and floats can now be used for determining the number of samples.
- Fixed some typos in the documentation.
v0.23
v0.23
- Added
paretodistribution. - Added
get_median_and_cito return the median and a given confidence interval for data. discreteandmixturedistributions now give more detail when printed.- Fixed some typos in the documentation.
v0.22
v0.22
- Added
extremizeto extremize predictions. - Added
normalizeto normalize a list of numbers to sum to 1. - Added
get_mean_and_cito return the mean and a given confidence interval for data. - Added
is_distto determine if an object is a Squigglepy distribution. - Added
is_sampleableto determine if an object can be sampled usingsample. - Support for working within Pandas is now explicitly added.
pandashas been added as a requirement. discretesampling now will compress a large array if possible for more efficient sampling.clip,lclip, andrclipcan now be used without needing distributions.- Some functions (e.g,
geomean) previously only supported lists, dictionaries, and numpy arrays. They have been expanded to support all iterables. dist_maxanddist_minnow support pipes (>>)get_percentilesnow coerces output to integer ifdigitsis less than or equal to 0, instead of just exactly 0.
v0.21
v0.21
- Mixture sampling is now 4-23x faster.
- You can now get the version of squigglepy via
sq.__version__. - Fixes a bug where the tqdm was displayed with the incorrect count when collecting cores during a multicore
sample.