code reviews

This commit is contained in:
Miha Kralj
2026-01-18 22:23:50 -08:00
parent 86fe32a682
commit 4673f48a70
40 changed files with 1155 additions and 309 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ public class HuberTests
Assert.Contains("Huber", huber.Name, StringComparison.Ordinal);
huber.Update(100, 105);
Assert.NotEqual(0, huber.Last.Time);
Assert.NotEqual(0, huber.Last.Value);
}
[Fact]
@@ -403,4 +403,4 @@ public class HuberTests
// With delta=5: linear region -> 5*10 - 12.5 = 37.5
Assert.NotEqual(huber1.Last.Value, huber2.Last.Value);
}
}
}
+2 -2
View File
@@ -22,7 +22,7 @@ public class MaeTests
Assert.Contains("Mae", mae.Name, StringComparison.Ordinal);
mae.Update(100, 105);
Assert.NotEqual(0, mae.Last.Time);
Assert.NotEqual(0, mae.Last.Value);
}
[Fact]
@@ -356,4 +356,4 @@ public class MaeTests
// After resync, result should still be correct
Assert.Equal(10.0, mae.Last.Value, 10);
}
}
}
+2 -2
View File
@@ -22,7 +22,7 @@ public class MapdTests
Assert.Contains("Mapd", mapd.Name, StringComparison.Ordinal);
mapd.Update(100, 105);
Assert.NotEqual(0, mapd.Last.Time);
Assert.NotEqual(0, mapd.Last.Value);
}
[Fact]
@@ -353,4 +353,4 @@ public class MapdTests
var result = mapd.Update(10, 0);
Assert.True(double.IsFinite(result.Value));
}
}
}
+2 -2
View File
@@ -22,7 +22,7 @@ public class MapeTests
Assert.Contains("Mape", mape.Name, StringComparison.Ordinal);
mape.Update(100, 105);
Assert.NotEqual(0, mape.Last.Time);
Assert.NotEqual(0, mape.Last.Value);
}
[Fact]
@@ -386,4 +386,4 @@ public class MapeTests
// Over-prediction should have higher MAPE due to smaller denominator
Assert.True(overPrediction.Value > underPrediction.Value);
}
}
}
+2 -2
View File
@@ -22,7 +22,7 @@ public class MeTests
Assert.Contains("Me", me.Name, StringComparison.Ordinal);
me.Update(100, 105);
Assert.NotEqual(0, me.Last.Time);
Assert.NotEqual(0, me.Last.Value);
}
[Fact]
@@ -382,4 +382,4 @@ public class MeTests
// After resync, result should still be correct
Assert.Equal(10.0, me.Last.Value, 10);
}
}
}
+2 -2
View File
@@ -22,7 +22,7 @@ public class MraeTests
Assert.Contains("Mrae", mrae.Name, StringComparison.Ordinal);
mrae.Update(100, 105);
Assert.NotEqual(0, mrae.Last.Time);
Assert.NotEqual(0, mrae.Last.Value);
}
[Fact]
@@ -330,4 +330,4 @@ public class MraeTests
Assert.Equal(0.1, mrae.Last.Value, 10);
}
}
}
+2 -2
View File
@@ -22,7 +22,7 @@ public class MseTests
Assert.Contains("Mse", mse.Name, StringComparison.Ordinal);
mse.Update(100, 105);
Assert.NotEqual(0, mse.Last.Time);
Assert.NotEqual(0, mse.Last.Value);
}
[Fact]
@@ -308,4 +308,4 @@ public class MseTests
Assert.True(double.IsFinite(val), $"Expected finite value but got {val}");
}
}
}
}
+2 -2
View File
@@ -22,7 +22,7 @@ public class RmseTests
Assert.Contains("Rmse", rmse.Name, StringComparison.Ordinal);
rmse.Update(100, 105);
Assert.NotEqual(0, rmse.Last.Time);
Assert.NotEqual(0, rmse.Last.Value);
}
[Fact]
@@ -247,4 +247,4 @@ public class RmseTests
// All errors are 5, MSE = 25, RMSE = 5
Assert.Equal(5.0, results.Last.Value, 10);
}
}
}