truncated.F¶
Module: truncated.F
¶
Inheritance diagram for selectinf.truncated.F
:
Class¶
truncated_F
¶
-
class
selectinf.truncated.F.
truncated_F
(intervals, d1, d2, scale=1)[source]¶ Bases:
selectinf.truncated.base.truncated
-
__init__
(intervals, d1, d2, scale=1)[source]¶ Create a new truncated distribution object This method is abstract : it has to be overriden
- Parameters
intervals : [(float, float)]
The intervals the distribution is truncated to
-
cdf
(z)¶ Compute the survival function of the truncated distribution
- Parameters
z : float
Minimum bound of the interval
- Returns
cdf : float
function The cumulative distribution function of the truncated distribution cdf(z) = P( X < z | X is in intervals )
WARNING : This method only use the sf method
more precise
-
pdf
(z)¶ Compute the probability distribution funtion of the truncated distribution
- Parameters
z : float
- Returns
p : float
p(z) such that E[f(X)] = int f(z)p(z)dz
-
quantile
(q, tol=1e-06)¶
-
rvs
(size=1)¶ Sample a random variable from the truncated disribution
- Parameters
size : int
Number of samples. Default : 1
- Returns
X : np.array
array of sample
-
sf
(z)¶ Compute the survival function of the truncated distribution
- Parameters
z : float
Minimum bound of the interval
- Returns
sf : float
The survival function of the truncated distribution sf(z) = P( X > z | X is in intervals )
-