center_of_mass_i += (pt_ij[0] + pt_ij[1] + pt_ij[2])

    center_of_mass_i = center_of_mass_i / float(nPt)

    pt_mat_i = np.zeros([2, nPt])

    for j in range(nPt):
        pt_ij = output_i.GetPoint(j)

        pt_ij_norm = [(pt_ij[0] - center_of_mass_i) / size_i,
                      (pt_ij[1] - center_of_mass_i) / size_i]

        pt_mat_i[0, j] = pt_ij_norm[0]
        pt_mat_i[1, j] = pt_ij_norm[1]

    shape_i = manifolds.kendall2D(nPt)
    scale_i = manifolds.pos_real(1)
    scale_i.SetPoint(scale_obs_list[i])
    shape_i.SetPoint(pt_mat_i)

    scale_shape_i = manifolds.scale_kendall2D(nPt)
    scale_shape_i.SetPoint([scale_i, shape_i])

    # Covariates
    if i in male_list:
        s_i = 1
    else:
        s_i = 0

    # if i in autism_list:
    # 	autism_i = 1
コード例 #2
0
        center_of_mass_i += (pt_ij[0] + pt_ij[1] + pt_ij[2])

    center_of_mass_i = center_of_mass_i / float(nPt)

    pt_mat_i = np.zeros([2, nPt])

    for j in range(nPt):
        pt_ij = output_i.GetPoint(j)

        pt_ij_norm = [(pt_ij[0] - center_of_mass_i) / size_i,
                      (pt_ij[1] - center_of_mass_i) / size_i]

        pt_mat_i[0, j] = pt_ij_norm[0]
        pt_mat_i[1, j] = pt_ij_norm[1]

    shape_i = manifolds.kendall2D(nPt)
    shape_i.SetPoint(pt_mat_i)

    # Covariates
    if i in male_list:
        s_i = 1
    else:
        s_i = 0

    # if i in autism_list:
    # 	autism_i = 1
    # else:
    # 	autism_i = 0

    # if i in autismspec_list:
    # 	autismspec_i = 1
コード例 #3
0
        center_of_mass_i += (pt_ij[0] + pt_ij[1] + pt_ij[2])

    center_of_mass_i = center_of_mass_i / float(nPt)

    pt_mat_i = np.zeros([2, nPt])

    for j in range(nPt):
        pt_ij = output_i.GetPoint(j)

        pt_ij_norm = [(pt_ij[0] - center_of_mass_i) / size_i,
                      (pt_ij[1] - center_of_mass_i) / size_i]

        pt_mat_i[0, j] = pt_ij_norm[0]
        pt_mat_i[1, j] = pt_ij_norm[1]

    shape_i = manifolds.kendall2D(nPt)
    shape_i.SetPoint(pt_mat_i)

    # Covariates
    if i in male_list:
        s_i = 1
    else:
        s_i = 0

    if i in autism_list:
        autism_i = 1
    else:
        autism_i = 0

    if i in autismspec_list:
        autismspec_i = 1
コード例 #4
0
    print(center_of_mass_i)

    pt_mat_i = np.zeros([2, nPt])

    for j in range(nPt):
        pt_ij = output_i.GetPoint(j)

        pt_ij_norm = [(pt_ij[0] - center_of_mass_i) / size_i,
                      (pt_ij[1] - center_of_mass_i) / size_i]

        pt_mat_i[0, j] = pt_ij_norm[0]
        pt_mat_i[1, j] = pt_ij_norm[1]

    shape_list.append(pt_mat_i)

shape_0 = manifolds.kendall2D(nPt)
print(len(shape_list[0]))
print(nPt)

shape_0.SetPoint(shape_list[0])
print(shape_0.pt[0, 1])

# Log Map Check
shape0 = manifolds.kendall2D(nPt)
shape0.SetPoint(shape_list[0])

shape1 = manifolds.kendall2D(nPt)
shape1.SetPoint(shape_list[1])

print("Construction Done")
tVec_check = shape0.LogMap(shape1)