poplar.distributions
Some standard distributions with vectorised probability density functions (pdfs) and a routine for numerical cumulative density function (CDF) computation and distribution sampling.
If the user requires other distributions, they can implement them as their own class by subclassing the Distribution base class and adding their own methods as required.
Classes
A power law distribution with fixed limits (i.e. the pdf does not take the limits as arguments, they are fixed at initialisation). |
|
A power law distribution with variable limits (i.e. the pdf takes the limits as arguments). |
|
A truncated normal distribution with fixed limits (i.e. the pdf does not take the limits as arguments, they are fixed at initialisation). |
|
A uniform distribution with fixed limits (i.e. the pdf does not take the limits as arguments, they are fixed at initialisation). |
|
A Beta distribution with fixed limits (i.e. the pdf does not take the limits as arguments, they are fixed at initialisation). |
|
A Truncated Beta distribution with fixed limits (i.e. the pdf does not take the limits as arguments, they are fixed at initialisation). |
|
A distribution similar to Peak+PowerLaw with fixed bounds (i.e. the pdf does not take the limits as arguments, they are fixed at initialisation). |
Module Contents
- class poplar.distributions.FixedLimitsPowerLaw(limits, npoints=1000, grid_spacing='logarithmic', device='cpu')
Bases:
DistributionA power law distribution with fixed limits (i.e. the pdf does not take the limits as arguments, they are fixed at initialisation).
- Parameters:
- limitslist
[Lower, Upper] limits for this distribution. Used to initialise the CDF computational grid.
- npointsint, optional
number of points in CDF computational grid, by default 1000
- grid_spacingstr, optional
specifies either linear or logarithmic spacing for CDF computational grid, by default ‘linear’
- devicestr, optional
pytorch device this distribution operates using, by default “cpu”
- class poplar.distributions.VariableLimitsPowerLaw(limits, npoints=1000, grid_spacing='logarithmic', device='cpu')
Bases:
DistributionA power law distribution with variable limits (i.e. the pdf takes the limits as arguments).
- Parameters:
- limitslist
[Lower, Upper] limits for this distribution. Used to initialise the CDF computational grid.
- npointsint, optional
number of points in CDF computational grid, by default 1000
- grid_spacingstr, optional
specifies either linear or logarithmic spacing for CDF computational grid, by default ‘linear’
- devicestr, optional
pytorch device this distribution operates using, by default “cpu”
- class poplar.distributions.FixedLimitsTruncatedGaussian(limits, npoints=1000, grid_spacing='linear', device='cpu')
Bases:
DistributionA truncated normal distribution with fixed limits (i.e. the pdf does not take the limits as arguments, they are fixed at initialisation).
Ref : http://parker.ad.siu.edu/Olive/ch4.pdf
- Parameters:
- limitslist
[Lower, Upper] limits for this distribution. Used to initialise the CDF computational grid.
- npointsint, optional
number of points in CDF computational grid, by default 1000
- grid_spacingstr, optional
specifies either linear or logarithmic spacing for CDF computational grid, by default ‘linear’
- devicestr, optional
pytorch device this distribution operates using, by default “cpu”
- class poplar.distributions.UniformDistribution(limits, npoints=1000, grid_spacing='linear', device='cpu')
Bases:
DistributionA uniform distribution with fixed limits (i.e. the pdf does not take the limits as arguments, they are fixed at initialisation).
- Parameters:
- limitslist
[Lower, Upper] limits for this distribution. Used to initialise the CDF computational grid.
- npointsint, optional
number of points in CDF computational grid, by default 1000
- grid_spacingstr, optional
specifies either linear or logarithmic spacing for CDF computational grid, by default ‘linear’
- devicestr, optional
pytorch device this distribution operates using, by default “cpu”
- class poplar.distributions.FixedLimitBetaDistribution(limits, npoints=1000, grid_spacing='linear', device='cpu')
Bases:
DistributionA Beta distribution with fixed limits (i.e. the pdf does not take the limits as arguments, they are fixed at initialisation).
- Parameters:
- limitslist
[Lower, Upper] limits for this distribution. Used to initialise the CDF computational grid.
- npointsint, optional
number of points in CDF computational grid, by default 1000
- grid_spacingstr, optional
specifies either linear or logarithmic spacing for CDF computational grid, by default ‘linear’
- devicestr, optional
pytorch device this distribution operates using, by default “cpu”
- class poplar.distributions.FixedLimitTruncatedBetaDistribution(limits, npoints=1000, grid_spacing='linear', device='cpu')
Bases:
DistributionA Truncated Beta distribution with fixed limits (i.e. the pdf does not take the limits as arguments, they are fixed at initialisation).
- Parameters:
- limitslist
[Lower, Upper] limits for this distribution. Used to initialise the CDF computational grid.
- npointsint, optional
number of points in CDF computational grid, by default 1000
- grid_spacingstr, optional
specifies either linear or logarithmic spacing for CDF computational grid, by default ‘linear’
- devicestr, optional
pytorch device this distribution operates using, by default “cpu”
- class poplar.distributions.FixedLimits_PowerLawTruncatedGaussian(limits, npoints=1000, grid_spacing='linear', device='cpu')
Bases:
DistributionA distribution similar to Peak+PowerLaw with fixed bounds (i.e. the pdf does not take the limits as arguments, they are fixed at initialisation). Ref : https://arxiv.org/abs/2010.14533
- Parameters:
- limitslist
[Lower, Upper] limits for this distribution. Used to initialise the CDF computational grid.
- npointsint, optional
number of points in CDF computational grid, by default 1000
- grid_spacingstr, optional
specifies either linear or logarithmic spacing for CDF computational grid, by default ‘linear’
- devicestr, optional
pytorch device this distribution operates using, by default “cpu”