I need to generate random samples from a distribution that looks roughly like this:
To generate the image above I combined two powerlaws:
y = a * x**(a - 1) + b * x**(b - 1)
with parameters a, b
controlling the shape of the distribution. Ideally a single shape parameter would be better.
There are dozens of distributions defined in scipy
's Continuous distributions section but I haven't been able to find one that matches what I need.
Aucun commentaire:
Enregistrer un commentaire