コード例 #1
0
        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));
            }
        }
コード例 #2
0
 protected override void PrepareLabels(IChannel ch)
 {
     TrainSetLabels = new DominationLossObjectiveFunction.BestDocsPerQuery(TrainSet);
 }
コード例 #3
0
 public DominationLossTest(ScoreTracker scoreTracker, DominationLossObjectiveFunction.BestDocsPerQuery bestDocsPerQuery)
     : base(scoreTracker)
 {
     _bestDocsPerQuery = bestDocsPerQuery;
     Contracts.Check(scoreTracker.Dataset.NumQueries == bestDocsPerQuery.BestDocs.Length, "Mismatch between dataset and labels");
 }