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