Esempio n. 1
0
 def __init__(self, dist, trans):
     """
     Args:
         dist (Dist) : Distribution to wrap the copula around.
         trans (Dist) : The copula wrapper `[0,1]^D \into [0,1]^D`.
     """
     Dist.__init__(self, dist=dist, trans=trans,
             _advance=True, _length=len(trans))
Esempio n. 2
0
 def __init__(self, dist, N):
     """
     Parameters:
         dist : Dist
             Input variable. Must have `len(dist)==1`.
         N : int
             Number of variable in the output.
     """
     assert len(dist)==1 and N>1
     Dist.__init__(self, dist=dist, _length=N)
Esempio n. 3
0
    def __init__(self, loc=[0,0], scale=[[1,.5],[.5,1]]):

        loc, scale = np.asfarray(loc), np.asfarray(scale)
        assert len(loc)==len(scale)

        dist = chaospy.dist.joint.Iid(normal(), len(loc))
        C = np.linalg.cholesky(scale)
        Ci = np.linalg.inv(C)
        Dist.__init__(self, dist=dist, loc=loc, C=C, Ci=Ci,
                scale=scale, _length=len(scale), _advance=True)
Esempio n. 4
0
 def __init__(self, dist, trans):
     """
     Args:
         dist (Dist) : Distribution to wrap the copula around.
         trans (Dist) : The copula wrapper `[0,1]^D \into [0,1]^D`.
     """
     Dist.__init__(self,
                   dist=dist,
                   trans=trans,
                   _advance=True,
                   _length=len(trans))
Esempio n. 5
0
    def __init__(self, dist, N):
        """
Parameters
----------
dist : Dist
    Input variable. Must have `len(dist)==1`.
N : int
    Number of variable in the output.
        """
        assert len(dist)==1 and N>1
        Dist.__init__(self, dist=dist, _length=N)
Esempio n. 6
0
    def __init__(self, R, ordering=None):
        "R symmetric & positive definite matrix"

        if ordering is None:
            ordering = range(len(R))
        ordering = np.array(ordering)

        P = np.eye(len(R))[ordering]

        R = np.dot(P, np.dot(R, P.T))
        R = np.linalg.cholesky(R)
        R = np.dot(P.T, np.dot(R, P))
        Ci = np.linalg.inv(R)
        Dist.__init__(self, C=R, Ci=Ci, _length=len(R))
Esempio n. 7
0
    def __init__(self, R, ordering=None):
        "R symmetric & positive definite matrix"

        if ordering is None:
            ordering = range(len(R))
        ordering = np.array(ordering)

        P = np.eye(len(R))[ordering]

        R = np.dot(P, np.dot(R, P.T))
        R = np.linalg.cholesky(R)
        R = np.dot(P.T, np.dot(R, P))
        Ci = np.linalg.inv(R)
        Dist.__init__(self, C=R, Ci=Ci, _length=len(R))
Esempio n. 8
0
    def __init__(self, *args):
        """
Parameters
----------
*args : [Dist, ..., Dist]
    Set of univariate distributions to join into joint.
        """

        assert np.all([isinstance(_, Dist) for _ in args])
        prm = {"_%03d" % i: args[i] for i in range(len(args))}
        Dist.__init__(self, _advance=True, _length=len(args), **prm)
        self.sorting = []
        for dist in self.graph:
            if dist in args:
                self.sorting.append(args.index(dist))
Esempio n. 9
0
    def __init__(self, *args):
        """
Parameters
----------
*args : [Dist, ..., Dist]
    Set of univariate distributions to join into joint.
        """

        assert np.all([isinstance(_, Dist) for _ in args])
        prm = {"_%03d" % i:args[i] for i in range(len(args))}
        Dist.__init__(self, _advance=True, _length=len(args), **prm)
        self.sorting = []
        for dist in self.graph:
            if dist in args:
                self.sorting.append(args.index(dist))
Esempio n. 10
0
    def __init__(self, loc=[0, 0], scale=[[1, .5], [.5, 1]]):

        loc, scale = np.asfarray(loc), np.asfarray(scale)
        assert len(loc) == len(scale)

        dist = chaospy.dist.joint.Iid(normal(), len(loc))
        C = np.linalg.cholesky(scale)
        Ci = np.linalg.inv(C)
        Dist.__init__(self,
                      dist=dist,
                      loc=loc,
                      C=C,
                      Ci=Ci,
                      scale=scale,
                      _length=len(scale),
                      _advance=True)
Esempio n. 11
0
 def __init__(self, a=1, loc=[0, 0], scale=[[1, .5], [.5, 1]]):
     loc, scale = np.asfarray(loc), np.asfarray(scale)
     C = np.linalg.cholesky(scale)
     Ci = np.linalg.inv(C)
     Dist.__init__(self, a=a, C=C, Ci=Ci, loc=loc, _length=len(C))
Esempio n. 12
0
 def __init__(self, df, nc):
     Dist.__init__(self, df=df, nc=nc)
Esempio n. 13
0
 def __init__(self, mu):
     Dist.__init__(self, mu=mu)
Esempio n. 14
0
 def __init__(self, N, theta, eps=1e-6):
     "theta!=0"
     theta = float(theta)
     assert theta != 0
     Dist.__init__(self, th=theta, _length=N, eps=eps)
Esempio n. 15
0
 def __init__(self, nu):
     Dist.__init__(self, nu=nu)
Esempio n. 16
0
 def __init__(self, df=1):
     Dist.__init__(self, df=df)
Esempio n. 17
0
 def __init__(self, c=1.):
     Dist.__init__(self, c=c)
Esempio n. 18
0
 def __init__(self, c=0):
     Dist.__init__(self, c=c)
Esempio n. 19
0
 def __init__(self, a=.5):
     assert np.all(a >= 0) and np.all(a <= 1)
     Dist.__init__(self, a=a)
Esempio n. 20
0
 def __init__(self, a=1, c=1):
     Dist.__init__(self, a=a, c=c)
Esempio n. 21
0
 def __init__(self, b=1):
     Dist.__init__(self, b=b)
Esempio n. 22
0
 def __init__(self, a=1):
     Dist.__init__(self, a=a)
Esempio n. 23
0
 def __init__(self, df=1):
     Dist.__init__(self, df=df)
Esempio n. 24
0
 def __init__(self):
     Dist.__init__(self)
Esempio n. 25
0
 def __init__(self, lo=0, up=1):
     Dist.__init__(self, lo=lo, up=up)
Esempio n. 26
0
 def __init__(self, x, a, c):
     Dist.__init__(self, a=a, c=c)
Esempio n. 27
0
 def __init__(self, a=1, loc=[0,0], scale=[[1,.5],[.5,1]]):
     loc, scale = np.asfarray(loc), np.asfarray(scale)
     C = np.linalg.cholesky(scale)
     Ci = np.linalg.inv(C)
     Dist.__init__(self, a=a, C=C, Ci=Ci, loc=loc, _length=len(C))
Esempio n. 28
0
 def __init__(self, dist):
     Dist.__init__(self, dist=dist, _length=len(dist), _advance=True)
Esempio n. 29
0
 def __init__(self, b=1):
     Dist.__init__(self, b=b)
Esempio n. 30
0
 def __init__(self, c=1., d=1.):
     Dist.__init__(self, c=c, d=d)
Esempio n. 31
0
 def __init__(self):
     Dist.__init__(self)
Esempio n. 32
0
 def __init__(self, a=1, b=1):
     Dist.__init__(self, a=a, b=b)
Esempio n. 33
0
 def __init__(self, lo=0, up=1):
     Dist.__init__(self, lo=lo, up=up)
Esempio n. 34
0
 def __init__(self, a):
     Dist.__init__(a=a)
Esempio n. 35
0
 def __init__(self, k, s):
     Dist.__init__(self, k=k, s=s)
Esempio n. 36
0
 def __init__(self, N, theta, eps=1e-6):
     "theta in [1,inf)"
     theta = float(theta)
     assert theta >= 1
     Dist.__init__(self, th=theta, _length=N, eps=eps)
Esempio n. 37
0
 def __init__(self, dfn, dfd, nc):
     Dist.__init__(self, dfn=dfn, dfd=dfd, nc=nc)
Esempio n. 38
0
 def __init__(self, N, theta=1., eps=1e-6):
     theta = float(theta)
     Dist.__init__(self, th=theta, eps=eps, _length=N)
Esempio n. 39
0
 def __init__(self, c, s):
     Dist.__init__(self, c=c, s=s)
Esempio n. 40
0
 def __init__(self, lam):
     Dist.__init__(self, lam=lam)
Esempio n. 41
0
 def __init__(self, a, b, mu, sigma):
     Dist.__init__(self, a=a, b=b)
     self.norm = normal()*sigma+mu
     self.fa = self.norm.fwd(a)
     self.fb = self.norm.fwd(b)
Esempio n. 42
0
 def __init__(self, a=.5):
     assert np.all(a>=0) and np.all(a<=1)
     Dist.__init__(self, a=a)
Esempio n. 43
0
 def __init__(self, a):
     Dist.__init__(a=a)
Esempio n. 44
0
 def __init__(self, a, R):
     self.MV = chaospy.dist.mvstudentt(a, np.zeros(len(R)), R)
     self.UV = chaospy.dist.student_t(a)
     Dist.__init__(self, _length=len(R))
Esempio n. 45
0
 def __init__(self, a=1, b=1):
     assert np.all(a>0) and np.all(b>0)
     Dist.__init__(self, a=a, b=b)
Esempio n. 46
0
 def __init__(self, N, theta=1., eps=1e-6):
     Dist.__init__(self, th=float(theta), _length=N, eps=eps)
Esempio n. 47
0
 def __init__(self, lam):
     Dist.__init__(self, lam=lam)
Esempio n. 48
0
 def __init__(self, N, theta=.5, eps=1e-6):
     theta = float(theta)
     assert -1 <= theta < 1
     Dist.__init__(self, th=theta, _length=N, eps=eps)
Esempio n. 49
0
 def __init__(self, c=1., d=1.):
     Dist.__init__(self, c=c, d=d)
Esempio n. 50
0
 def __init__(self, N, theta, eps=1e-6):
     "theta!=0"
     theta = float(theta)
     assert theta != 0
     Dist.__init__(self, th=theta, _length=N, eps=eps)
Esempio n. 51
0
 def __init__(self, a=1):
     Dist.__init__(self, a=a)
Esempio n. 52
0
 def __init__(self, a, b, mu, sigma):
     Dist.__init__(self, a=a, b=b)
     self.norm = normal() * sigma + mu
     self.fa = self.norm.fwd(a)
     self.fb = self.norm.fwd(b)
Esempio n. 53
0
 def __init__(self, a=1, b=1, c=1):
     Dist.__init__(self, a=a, b=b, c=c)
Esempio n. 54
0
 def __init__(self, a, R):
     self.MV = chaospy.dist.mvstudentt(a, np.zeros(len(R)), R)
     self.UV = chaospy.dist.student_t(a)
     Dist.__init__(self, _length=len(R))
Esempio n. 55
0
 def __init__(self, c=1):
     Dist.__init__(self, c=c)
Esempio n. 56
0
 def __init__(self, N, theta=1.0, eps=1e-6):
     Dist.__init__(self, th=float(theta), _length=N, eps=eps)
Esempio n. 57
0
 def __init__(self, dist):
     lo, up = dist.range()
     assert np.all(lo >= -1) and np.all(up <= 1)
     Dist.__init__(self, dist=dist, _length=len(dist), _advance=True)
Esempio n. 58
0
 def __init__(self, N, theta=0.5, eps=1e-6):
     theta = float(theta)
     assert -1 <= theta < 1
     Dist.__init__(self, th=theta, _length=N, eps=eps)
Esempio n. 59
0
 def __init__(self, dist):
     assert np.all(dist.range() >= 1)
     Dist.__init__(self, dist=dist, _length=len(dist), _advance=True)
Esempio n. 60
0
 def __init__(self, a=1, b=1):
     assert np.all(a > 0) and np.all(b > 0)
     Dist.__init__(self, a=a, b=b)