mnhrdt / pystab Goto Github PK
View Code? Open in Web Editor NEWstable distribution simulation and estimation
stable distribution simulation and estimation
STAB ==== Simulation and estimation of stable scalar variables. TUTORIAL -------- # install !pip install pystab # import import stab # generate one million normal samples x = stab.stables(2, 0, 10**6) # estimate the four parameters from the vector x stab.fit_quantiles(x) > (1.9972697816715559, 0.018033003626273775, 0.9993768437879497, -0.000605309795968803) # generate one million Lévy samples x = stab.stables(0.5, 1, 10**6) # estimate the parameters # (notice that the shift parameter is imprecise due to heavy tails) stab.fit_quantiles(x) > (0.5000056240198412, 0.9998393548232919, 0.9901156603367183, 1.0144504595708657) DOCUMENTATION ------------- # core functions stable(α, β): # Return a S(α,β,1,0) pseudorandom sample, α∈[2,0[, β∈[-1,1] stables(α, β): # Return a vector with n stable samples i.i.d. S(α,β,1,0) fit_quantiles(x): # Return a tuple (α,β,σ,μ) with the estimated 4 parameters # convenience functions uniform(): # Return a U(0,1) pseudorandom sample normal(): # Return a N(0,1) pseudorandom sample stable4(α,β,c,μ): # Return a S(α,β,c,μ) pseudorandom sample uniforms(n): # Return vector with n pseudorandom samples i.i.d. U(0,1) normals(n): # Return vector with n pseudorandom samples i.i.d. N(0,1) stables4(α,β,c,μ,n): # Return vector with n stable samples i.i.d. S(α,β,c,μ) ACKNOWLEDGEMENT --------------- Reference: https://en.wikipedia.org/wiki/Stable_distribution The simulation algorithm is that of Chambers-Mallows-Struck and Weron The estimation algorithm is McCulloch's quantile method, using the GPL implementation in C by Royuela. - McCulloch's original implemantation in GAUSS: https://www.asc.ohio-state.edu/mcculloch.2/programs/STAB - Royuela's website: http://www.lpi.tel.uva.es/~jroyval/ RELEASING --------- To update the pypi hub, you need an account on pypi, and then run the following commands: cd pypi # update version number on file setup.py # update version number on file stab.py python setup.py sdist bdist_wheel python -m twine upload dist/pystab-X.tar.gz rm -rf build dist pystab.egg-info
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.