| 51 | |
| 52 | # function to calculate the mean and std of a list in the results dictionary |
| 53 | def cal_mean_std(results) -> dict: |
| 54 | mean_std = dict() |
| 55 | for fn in results: |
| 56 | mean_std[fn] = dict() |
| 57 | for metric in results[fn]: |
| 58 | mean = statistics.mean(results[fn][metric]) if len(results[fn][metric]) > 1 else results[fn][metric][0] |
| 59 | std = statistics.stdev(results[fn][metric]) if len(results[fn][metric]) > 1 else 0 |
| 60 | mean_std[fn][metric] = [mean, std] |
| 61 | return mean_std |
| 62 | |
| 63 | |
| 64 | # function to create the environment ofr an anaconda environment |