Did I find the right examples for you? yes no

All Samples(17)  |  Call(16)  |  Derive(0)  |  Import(1)

src/p/a/PaCal-1.5/pacal/standard_distr.py   PaCal(Download)
 
import params
from utils import lgamma, wrap_pdf
from distr import Distr, DiscreteDistr, ConstDistr
from segments import PiecewiseFunction, PiecewiseDistribution, Segment
        #pdf = partial(_norm_pdf, self.mu, self.nrm, self.one_over_twosigma2)
        self.piecewise_pdf = PiecewiseDistribution([])
        wrapped_pdf = wrap_pdf(self.pdf)
        self.piecewise_pdf.addSegment(MInfSegment(b1, wrapped_pdf))
        self.piecewise_pdf.addSegment(Segment(b1, b2, wrapped_pdf))
    def init_piecewise_pdf(self):
        b1 = self.center - self.gamma
        b2 = self.center + self.gamma
        self.piecewise_pdf = PiecewiseDistribution([])
        wrapped_pdf = wrap_pdf(self.pdf)
    def init_piecewise_pdf(self):
        wrapped_pdf = wrap_pdf(self.pdf)
        if 1 <= self.df <= 20:
            self.piecewise_pdf = PiecewiseDistribution(fun = wrapped_pdf,  
                                                   breakPoints = [0.0, self.df/2.0, self.df*2.0, Inf],
    def init_piecewise_pdf(self):
        self.piecewise_pdf = PiecewiseDistribution([])
        wrapped_pdf = wrap_pdf(self.pdf)
        self.piecewise_pdf.addSegment(Segment(0, 1, wrapped_pdf))
        self.piecewise_pdf.addSegment(PInfSegment(1, wrapped_pdf))