21 instantiations of TestResult
Microsoft.ML.FastTree (21)
Training\Test.cs (21)
116return new TestResult( 359result.Add(new TestResult("NDCG@" + (i + 1).ToString(), ndcg[i] * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average)); 411new TestResult("NDCG@" + NdcgTruncation.ToString(), fastNdcg * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 454new TestResult("NDCG@" + NdcgTruncation.ToString(), fastNdcg * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 485new TestResult("MaxSurplus", surplus[6] * _scaleFactor, 1.0, false, TestResult.ValueOperator.Sum), 486new TestResult("Surplus@100", surplus[0] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 487new TestResult("Surplus@200", surplus[1] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 488new TestResult("Surplus@300", surplus[2] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 489new TestResult("Surplus@400", surplus[3] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 490new TestResult("Surplus@500", surplus[4] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 491new TestResult("Surplus@1000", surplus[5] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 492new TestResult("MaxSurplusPos", surplus[7], 1, false, TestResult.ValueOperator.Sum), 493new TestResult("PercentTop", surplus[7], surplus[8], false, TestResult.ValueOperator.Average), 574result.Add(new TestResult("L1", totalL1Error, Dataset.NumDocs, true, TestResult.ValueOperator.Average)); 577result.Add(new TestResult("L2", totalL2Error, Dataset.NumDocs, true, TestResult.ValueOperator.SqrtAverage)); 580result.Add(new TestResult("L1", totalL1Error, Dataset.NumDocs, true, TestResult.ValueOperator.Average)); 581result.Add(new TestResult("L2", totalL2Error, Dataset.NumDocs, true, TestResult.ValueOperator.SqrtAverage)); 707new TestResult("ErrorRate", totalErrorRate * totalAllDocumentsWeight, totalAllDocumentsWeight, true, TestResult.ValueOperator.Average), 708new TestResult("LossRate", totalLossRate * totalAllDocumentsWeight, totalAllDocumentsWeight, true, TestResult.ValueOperator.Average), 709new TestResult("BalancedErrorRate", totalBalancedErrorRate, 1, true, TestResult.ValueOperator.None), 710new TestResult("BalancedLossRate", totalBalancedLossRate, 1, true, TestResult.ValueOperator.None),
63 references to TestResult
Microsoft.ML.FastTree (63)
BoostingFastTree.cs (2)
127var validationResult = ValidTest.ComputeTests().First(); 131var trainingResult = TrainTest.ComputeTests().First();
FastTreeRanking.cs (1)
356foreach (var r in _firstTestSetHistory.ComputeTests())
FastTreeRegression.cs (1)
379foreach (var r in _firstTestSetHistory.ComputeTests())
FastTreeTweedie.cs (1)
315foreach (var r in _firstTestSetHistory.ComputeTests())
GamTrainer.cs (1)
430var finalResult = PruningTest.ComputeTests().ToArray()[PruningLossIndex];
Training\StepSearch.cs (1)
76public TestResult Loss;
Training\Test.cs (56)
14internal sealed class TestResult : IComparable<TestResult> 75public int CompareTo(TestResult o) 108public static TestResult FromByteArray(byte[] buffer, ref int offset) 150protected IEnumerable<TestResult> CachedResults; 153public abstract IEnumerable<TestResult> ComputeTests(double[] scores); 169public virtual IEnumerable<TestResult> ComputeTests() 176public IEnumerable<TestResult> TestScores(double[] scores) 186foreach (var r in ComputeTests()) 201protected IList<TestResult[]> History; 204public TestResult BestResult { get; private protected set; } 213History = new List<TestResult[]>(); 228protected virtual void UpdateBest(TestResult r) 237public sealed override IEnumerable<TestResult> ComputeTests() 244public sealed override IEnumerable<TestResult> ComputeTests(double[] scores) 300protected override void UpdateBest(TestResult r) 353public override IEnumerable<TestResult> ComputeTests(double[] scores) 355IList<TestResult> result = new List<TestResult>(); 359result.Add(new TestResult("NDCG@" + (i + 1).ToString(), ndcg[i] * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average)); 370foreach (var t in ComputeTests()) 393public override IEnumerable<TestResult> ComputeTests(double[] scores) 409List<TestResult> result = new List<TestResult>() 411new TestResult("NDCG@" + NdcgTruncation.ToString(), fastNdcg * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 430public override IEnumerable<TestResult> ComputeTests() 437public override IEnumerable<TestResult> ComputeTests(double[] scores) 452List<TestResult> result = new List<TestResult>() 454new TestResult("NDCG@" + NdcgTruncation.ToString(), fastNdcg * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 479public override IEnumerable<TestResult> ComputeTests(double[] scores) 483IList<TestResult> result = new List<TestResult>() 485new TestResult("MaxSurplus", surplus[6] * _scaleFactor, 1.0, false, TestResult.ValueOperator.Sum), 486new TestResult("Surplus@100", surplus[0] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 487new TestResult("Surplus@200", surplus[1] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 488new TestResult("Surplus@300", surplus[2] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 489new TestResult("Surplus@400", surplus[3] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 490new TestResult("Surplus@500", surplus[4] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 491new TestResult("Surplus@1000", surplus[5] * _scaleFactor * Dataset.NumQueries, Dataset.NumQueries, false, TestResult.ValueOperator.Average), 492new TestResult("MaxSurplusPos", surplus[7], 1, false, TestResult.ValueOperator.Sum), 493new TestResult("PercentTop", surplus[7], surplus[8], false, TestResult.ValueOperator.Average), 505foreach (var t in ComputeTests()) 532public override IEnumerable<TestResult> ComputeTests(double[] scores) 567List<TestResult> result = new List<TestResult>(); 574result.Add(new TestResult("L1", totalL1Error, Dataset.NumDocs, true, TestResult.ValueOperator.Average)); 577result.Add(new TestResult("L2", totalL2Error, Dataset.NumDocs, true, TestResult.ValueOperator.SqrtAverage)); 580result.Add(new TestResult("L1", totalL1Error, Dataset.NumDocs, true, TestResult.ValueOperator.Average)); 581result.Add(new TestResult("L2", totalL2Error, Dataset.NumDocs, true, TestResult.ValueOperator.SqrtAverage)); 646public override IEnumerable<TestResult> ComputeTests(double[] scores) 705List<TestResult> result = new List<TestResult>() 707new TestResult("ErrorRate", totalErrorRate * totalAllDocumentsWeight, totalAllDocumentsWeight, true, TestResult.ValueOperator.Average), 708new TestResult("LossRate", totalLossRate * totalAllDocumentsWeight, totalAllDocumentsWeight, true, TestResult.ValueOperator.Average), 709new TestResult("BalancedErrorRate", totalBalancedErrorRate, 1, true, TestResult.ValueOperator.None), 710new TestResult("BalancedLossRate", totalBalancedLossRate, 1, true, TestResult.ValueOperator.None),