private void AddDominationLossTests() { Tests.Add(new DominationLossTest(ConstructScoreTracker(TrainSet), TrainSetLabels)); if (ValidSet != null) { var labels = new DominationLossObjectiveFunction.BestDocsPerQuery(ValidSet); Tests.Add(new DominationLossTest(ConstructScoreTracker(ValidSet), labels)); } for (int t = 0; TestSets != null && t < TestSets.Length; ++t) { var labels = new DominationLossObjectiveFunction.BestDocsPerQuery(TestSets[t]); Tests.Add(new DominationLossTest(ConstructScoreTracker(TestSets[t]), labels)); } }
protected override void PrepareLabels(IChannel ch) { TrainSetLabels = new DominationLossObjectiveFunction.BestDocsPerQuery(TrainSet); }
public DominationLossTest(ScoreTracker scoreTracker, DominationLossObjectiveFunction.BestDocsPerQuery bestDocsPerQuery) : base(scoreTracker) { _bestDocsPerQuery = bestDocsPerQuery; Contracts.Check(scoreTracker.Dataset.NumQueries == bestDocsPerQuery.BestDocs.Length, "Mismatch between dataset and labels"); }