This commit is contained in:
parent
fb94d14854
commit
394b5393c0
24
RhSolutions.ML.Tests/ModelTests.cs
Normal file
24
RhSolutions.ML.Tests/ModelTests.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using RhSolutions.ML.Lib;
|
||||||
|
|
||||||
|
namespace RhSolutions.ML.Tests;
|
||||||
|
|
||||||
|
public class ModelTests
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public void EvaluateTest()
|
||||||
|
{
|
||||||
|
var testMetrics = RhSolutionsMLBuilder.EvaluateModel();
|
||||||
|
Console.WriteLine($"*************************************************************************************************************");
|
||||||
|
Console.WriteLine($"* Metrics for Multi-class Classification model - Test Data ");
|
||||||
|
Console.WriteLine($"*------------------------------------------------------------------------------------------------------------");
|
||||||
|
Console.WriteLine($"* MicroAccuracy: {testMetrics.MicroAccuracy:0.###}");
|
||||||
|
Console.WriteLine($"* MacroAccuracy: {testMetrics.MacroAccuracy:0.###}");
|
||||||
|
Console.WriteLine($"* LogLoss: {testMetrics.LogLoss:#.###}");
|
||||||
|
Console.WriteLine($"* LogLossReduction: {testMetrics.LogLossReduction:#.###}");
|
||||||
|
Console.WriteLine($"*************************************************************************************************************");
|
||||||
|
Assert.That(testMetrics.MicroAccuracy, Is.AtLeast(0.95));
|
||||||
|
Assert.That(testMetrics.MacroAccuracy, Is.AtLeast(0.95));
|
||||||
|
Assert.That(testMetrics.LogLoss, Is.AtMost(0.2));
|
||||||
|
Assert.That(testMetrics.LogLossReduction, Is.AtLeast(0.95));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user