mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-25 22:08:05 +00:00
style patterns
This commit is contained in:
@@ -345,8 +345,15 @@ public class HuberTests
|
||||
var actual = new TSeries();
|
||||
var predicted = new TSeries();
|
||||
|
||||
for (int i = 0; i < 10; i++) actual.Add(DateTime.UtcNow, i);
|
||||
for (int i = 0; i < 5; i++) predicted.Add(DateTime.UtcNow, i);
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
actual.Add(DateTime.UtcNow, i);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
predicted.Add(DateTime.UtcNow, i);
|
||||
}
|
||||
|
||||
Assert.Throws<ArgumentException>(() => Huber.Calculate(actual, predicted, 3));
|
||||
}
|
||||
@@ -403,4 +410,4 @@ public class HuberTests
|
||||
// With delta=5: linear region -> 5*10 - 12.5 = 37.5
|
||||
Assert.NotEqual(huber1.Last.Value, huber2.Last.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user