d0fe394f2b450ae3f25a7f49639e4480fe2ac0b0,chaospy/descriptives.py,,Sens_nataf,#Any#Any#Any#Any#,979

Before Change


    marginal = dist.prm["dist"]
    dim = len(dist)

    orth = ort.orth_ttr(order, marginal, sort="GR")

    r = range(dim)

    index0 = [0] + [1]*(dim-1)
    index1 = [1] + [0]*(dim-1)

    nataf = di.Nataf(marginal, cov, r)
    samples_ = marginal.inv( nataf.fwd( samples ) )
    poly, coeffs = co.fit_regression(orth, samples_, vals, retall=1)

    V = Var(poly, marginal, **kws)

    out = np.zeros((2, dim,) + poly.shape)
    out[0,0] = (V-Var(E_cond(poly, index0, marginal, **kws), marginal, **kws))/(V+(V==0))**(V!=0)
    out[1,0] = Var(E_cond(poly, index1, marginal, **kws), marginal, **kws)/(V+(V==0))*(V!=0)


    for i in xrange(1, dim):

        r = r[1:] + r[:1]
        index0 = index0[-1:] + index0[:-1]

        nataf = di.Nataf(marginal, cov, r)
        samples_ = marginal.inv( nataf.fwd( samples ) )
        poly, coeffs = co.fit_regression(orth, samples_, vals, retall=1)

        out[0,i] = (V-Var(E_cond(poly, index0, marginal, **kws), marginal, **kws))/(V+(V==0))*(V!=0)
        out[1,i] = Var(E_cond(poly, index1, marginal, **kws), marginal, **kws)/(V+(V==0))*(V!=0)

After Change


    marginal = dist.prm["dist"]
    dim = len(dist)

    orth = chaospy.orthogonal.orth_ttr(order, marginal, sort="GR")

    r = range(dim)

    index0 = [0] + [1]*(dim-1)
    index1 = [1] + [0]*(dim-1)

    nataf = chaospy.dist.Nataf(marginal, cov, r)
    samples_ = marginal.inv( nataf.fwd( samples ) )
    poly, coeffs = chaospy.collocation.fit_regression(
        orth, samples_, vals, retall=1)

    V = Var(poly, marginal, **kws)

    out = np.zeros((2, dim,) + poly.shape)
    out[0, 0] = (V - Var(E_cond(poly, index0, marginal, **kws),
                        marginal, **kws))/(V+(V == 0))**(V != 0)
    out[1, 0] = Var(E_cond(poly, index1, marginal, **kws),
                   marginal, **kws)/(V+(V == 0))*(V != 0)

    for i in xrange(1, dim):

        r = r[1:] + r[:1]
        index0 = index0[-1:] + index0[:-1]

        nataf = chaospy.dist.Nataf(marginal, cov, r)
        samples_ = marginal.inv( nataf.fwd( samples ) )
        poly, coeffs = chaospy.collocation.fit_regression(
            orth, samples_, vals, retall=1)

        out[0, i] = (V-Var(E_cond(poly, index0, marginal, **kws),
                          marginal, **kws))/(V+(V == 0))*(V != 0)
        out[1, i] = Var(E_cond(poly, index1, marginal, **kws),
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: jonathf/chaospy
Commit Name: d0fe394f2b450ae3f25a7f49639e4480fe2ac0b0
Time: 2016-09-03
Author: jonathf@gmail.com
File Name: chaospy/descriptives.py
Class Name:
Method Name: Sens_nataf


Project Name: jonathf/chaospy
Commit Name: d0fe394f2b450ae3f25a7f49639e4480fe2ac0b0
Time: 2016-09-03
Author: jonathf@gmail.com
File Name: chaospy/descriptives.py
Class Name:
Method Name: Sens_t_nataf


Project Name: jonathf/chaospy
Commit Name: d0fe394f2b450ae3f25a7f49639e4480fe2ac0b0
Time: 2016-09-03
Author: jonathf@gmail.com
File Name: chaospy/descriptives.py
Class Name:
Method Name: Sens_nataf


Project Name: jonathf/chaospy
Commit Name: d0fe394f2b450ae3f25a7f49639e4480fe2ac0b0
Time: 2016-09-03
Author: jonathf@gmail.com
File Name: chaospy/descriptives.py
Class Name:
Method Name: Sens_m_nataf