fix(anomaly): exclude non-directional kinds from grading and backtest
Review follow-up (HIGH): the three detectors fed the same evaluator/backtest, but SuspensionFreeze is non-directional (favourite unchanged) — grading it as "favourite won" polluted the hit-rate with the base favourite-win rate, and its high frozen-ness score always cleared the backtest threshold. - Add AnomalyKind.IsDirectional() (flip + steam = true, freeze = false). - AnomalyOutcomeEvaluator returns Unresolved for non-directional kinds (favourites still surfaced for display) so they don't distort calibration. - RunBacktestUseCase skips non-directional anomalies when building candidates. - Tests for the classification, the evaluator path, and the backtest skip.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using FluentAssertions;
|
||||
using Marathon.Domain.Enums;
|
||||
|
||||
namespace Marathon.Domain.Tests.Enums;
|
||||
|
||||
public sealed class AnomalyKindExtensionsTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData(AnomalyKind.SuspensionFlip, true)]
|
||||
[InlineData(AnomalyKind.SteamMove, true)]
|
||||
[InlineData(AnomalyKind.SuspensionFreeze, false)]
|
||||
public void IsDirectional_Should_ClassifyKinds(AnomalyKind kind, bool expected)
|
||||
{
|
||||
kind.IsDirectional().Should().Be(expected);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user