getBasicStats(options.verbose, method, vehicles, assignments)

getStatisticsOutput(assignments, options.outputfile)
print 'The calculation of network statistics is done!'              

# begin the significance test for the observations with a normal distribution
if options.ttest:
    print 'begin the t test!'
    for A in assignments.itervalues():
        tValueAvg[A] = {}
    doTTestForAvg(options.verbose, tValueAvg, list(assignments.itervalues()))
    print 'The t test is done!'        
if options.kwtest:
    # The Kruskal-Wallis test is applied for the data, not drawn from a normally distributed population.
    groups = 2
    values = list(allvehicles.iteritems())
    for num, A in enumerate(values):
        for B in values[num+1: ]:
            combilabel = ''
            combivehlist = []
            combilabel = A[0] + '_' + B[0]
            print 'Test for:', combilabel
            for veh in A[1]:
                combivehlist.append(veh)
            for veh in B[1]:
                combivehlist.append(veh)
            doKruskalWallisTest(options.verbose, groups, combivehlist, assignments, combilabel, hValues)
        
getSignificanceTestOutput(assignments, options.ttest, tValueAvg, hValues, options.sgtoutputfile)
print 'The Significance test is done!'
Пример #2
0
getStatisticsOutput(assignments, options.outputfile)
print 'The calculation of network statistics is done!'

# begin the significance test for the observations with a normal distribution
if options.ttest:
    print 'begin the t test!'
    for A in assignments.itervalues():
        tValueAvg[A] = {}
    doTTestForAvg(options.verbose, tValueAvg, list(assignments.itervalues()))
    print 'The t test is done!'
if options.kwtest:
    # The Kruskal-Wallis test is applied for the data, not drawn from a normally distributed population.
    groups = 2
    values = list(allvehicles.iteritems())
    for num, A in enumerate(values):
        for B in values[num + 1:]:
            combilabel = ''
            combivehlist = []
            combilabel = A[0] + '_' + B[0]
            print 'Test for:', combilabel
            for veh in A[1]:
                combivehlist.append(veh)
            for veh in B[1]:
                combivehlist.append(veh)
            doKruskalWallisTest(options.verbose, groups, combivehlist,
                                assignments, combilabel, hValues)

getSignificanceTestOutput(assignments, options.ttest, tValueAvg, hValues,
                          options.sgtoutputfile)
print 'The Significance test is done!'