Esempio n. 1
0
     激情驾驶:15-18题
 """
 attitude1 = np.array(range(1, 10))
 attitude2 = np.array(range(10, 15))
 attitude3 = np.array(range(15, 19))
 attitude_all = np.array(range(1, 19))
 title = np.array(
     ["安全驾驶态度:妨碍道路畅通且不规则遵守", "安全驾驶态度:超速驾驶", "安全驾驶态度:激情驾驶", "整体安全驾驶态度差"])
 n = n + len(title)
 data = p.sum_score(data, attitude1, attitude2, attitude3, attitude_all)
 table = np.hstack((table, title))
 """
     驾驶员自我效能感,1-9反向记分
 """
 reverse_order = np.array(range(1, 10)) + 19 - 1
 data = p.reverce_score(data, reverse_order, 7)
 self = np.array(range(1, 13)) + 19 - 1
 title2 = np.array(["驾驶员自我效能感差"])
 data = p.sum_score(data, self)
 table = np.hstack((table, title2))
 n = n + len(title2)
 """
 多维度交通心理控制源:
     1-5题:其他驾驶员原因
     6-9题:自身原因
     10-12题:车辆和环境原因
     13-16题:命运原因
 得分越高表明在个体越容易把交通事故归结为某一因素
 """
 reason1 = np.array(range(1, 6)) + 31 - 1
 reason2 = np.array(range(6, 10)) + 31 - 1
Esempio n. 2
0
    father_factor_all = np.concatenate(
        (father_factor1, father_factor2, father_factor3, father_factor4,
         father_factor5, father_factor6, mother_factor1, mother_factor2,
         mother_factor3, mother_factor4, mother_factor5),
        axis=0)
    # print(data["14637李芸"][177:239])
    # 记分求和  父母教养方式
    n = n + 12
    data = th.sum_score(data, father_factor1, mother_factor1, father_factor2,
                        mother_factor2, father_factor3, mother_factor3,
                        father_factor4, mother_factor4, father_factor5,
                        mother_factor5, father_factor6, father_factor_all)

    # 自我控制量表**************************************************************************
    reverse_order = np.array([2, 3, 9, 12, 15, 16]) + 147 - 1
    data = p.reverce_score(data, reverse_order, 6)
    control_factor1 = np.array([1, 10, 5, 14]) + 147 - 1
    control_factor2 = np.array([4, 13, 15, 16, 6, 11]) + 147 - 1
    control_factor3 = np.array([2, 12, 3, 7, 8, 9]) + 147 - 1
    control_factor_all = np.concatenate(
        (control_factor1, control_factor2, control_factor3), axis=0)
    data = th.sum_score(data, control_factor1, control_factor2,
                        control_factor3, control_factor_all)
    n = n + 4
    # 领悟社会支持**************************************************************************
    reverse_order = np.array([3, 4, 8, 11, 6, 7, 9, 12, 1, 2, 5, 10]) + 164 - 1
    data = p.reverce_score(data, reverse_order, 6)
    society_factory1 = np.array([3, 4, 8, 11]) + 164 - 1
    society_factory2 = np.array([6, 7, 9, 12]) + 164 - 1
    society_factory3 = np.array([1, 2, 5, 10]) + 164 - 1
    society_factory_all = np.concatenate(