computeExperimentAnalyses computes statistical analyses for all named experiments. configs maps experiment names to their configuration; values may be nil.
(experiments []ExperimentVariantStats, configs map[string]*workflow.ExperimentConfig)
| 283 | // computeExperimentAnalyses computes statistical analyses for all named experiments. |
| 284 | // configs maps experiment names to their configuration; values may be nil. |
| 285 | func computeExperimentAnalyses(experiments []ExperimentVariantStats, configs map[string]*workflow.ExperimentConfig) []ExperimentAnalysis { |
| 286 | if len(experiments) == 0 { |
| 287 | return nil |
| 288 | } |
| 289 | analyses := make([]ExperimentAnalysis, 0, len(experiments)) |
| 290 | for _, exp := range experiments { |
| 291 | var cfg *workflow.ExperimentConfig |
| 292 | if configs != nil { |
| 293 | cfg = configs[exp.Name] |
| 294 | } |
| 295 | analyses = append(analyses, computeExperimentAnalysis(exp, cfg)) |
| 296 | } |
| 297 | return analyses |
| 298 | } |
| 299 | |
| 300 | // loadLocalExperimentConfigs reads the workflow .md file for the given experiment name |
| 301 | // and returns the ExperimentConfig map from its frontmatter. |