MCPcopy Create free account
hub / github.com/OpenDriveLab/TCP / cal_std

Function cal_std

tools/statistics.py:5–17  ·  view source on GitHub ↗
(score_list)

Source from the content-addressed store, hash-verified

3import json
4
5def cal_std(score_list):
6 total_length = len(score_list)
7 run1_list = score_list[::3]
8 run2_list = score_list[1::3]
9 run3_list = score_list[2::3]
10
11 mean = sum(score_list)/total_length
12 mean1 = sum(run1_list)/(total_length/3)
13 mean2 = sum(run2_list)/(total_length/3)
14 mean3 = sum(run3_list)/(total_length/3)
15
16 std = np.sqrt(((mean1-mean)**2 + (mean2-mean)**2 + (mean3-mean)**2)/3)
17 return std
18
19
20path = "TCP_result.json"

Callers 1

statistics.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected