Ignore:
Timestamp:
07/09/15 19:01:23 (9 years ago)
Author:
tim
Message:

.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/nanownlib/stats.py

    r7 r8  
    311311    ret_val = []
    312312    for t in range(num_trials):
    313         ret_val.append(estimator(subseries(db, probe_type, unusual_case, subseries_size)))
     313        ret_val.append(estimator(db.subseries(probe_type, unusual_case, subseries_size)))
    314314
    315315    return ret_val
     
    344344#         0 if it isn't unusual
    345345#        -1 if it is unusual in the wrong direction
    346 def multiBoxTest(params, unusual_case, greater, samples):
    347     #XXX: packet_rtt field from params
    348     dists = samples2Distributions(samples, 'packet_rtt')
    349    
    350     uc = dists[unusual_case]
    351     rest = []
    352     for tc,d in dists.items():
    353         if tc != unusual_case:
    354             rest.extend(d)
    355 
     346def multiBoxTest(params, greater, samples):
     347    uc = [s['unusual_case'] for s in samples]
     348    rest = [s['other_cases'] for s in samples]
     349   
    356350    uc_high = numpy.percentile(uc, params['high'])
    357351    rest_low = numpy.percentile(rest, params['low'])
     
    379373
    380374    mh = midhinge(diffs, params['distance'])
     375    #mh = trimean(diffs, params['distance'])
    381376    if greater:
    382377        if mh > params['threshold']:
Note: See TracChangeset for help on using the changeset viewer.