Changeset 8 for trunk/lib/nanownlib/stats.py
- Timestamp:
- 07/09/15 19:01:23 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/nanownlib/stats.py
r7 r8 311 311 ret_val = [] 312 312 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))) 314 314 315 315 return ret_val … … 344 344 # 0 if it isn't unusual 345 345 # -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 346 def multiBoxTest(params, greater, samples): 347 uc = [s['unusual_case'] for s in samples] 348 rest = [s['other_cases'] for s in samples] 349 356 350 uc_high = numpy.percentile(uc, params['high']) 357 351 rest_low = numpy.percentile(rest, params['low']) … … 379 373 380 374 mh = midhinge(diffs, params['distance']) 375 #mh = trimean(diffs, params['distance']) 381 376 if greater: 382 377 if mh > params['threshold']:
Note: See TracChangeset
for help on using the changeset viewer.