corrections

This commit is contained in:
Miha Kralj
2024-10-13 17:18:31 -07:00
parent 2236f5f483
commit bbefc72d73
65 changed files with 669 additions and 1087 deletions
+3 -17
View File
@@ -34,16 +34,16 @@ public class Mse : AbstractBase
}
/// <summary>
/// Initializes a new instance of the Mape class with the specified source and period.
/// Initializes a new instance of the Mse class with the specified source and period.
/// </summary>
/// <param name="source">The source object to subscribe to for value updates.</param>
/// <param name="period">The period over which to calculate the Mean Absolute Percentage Error.</param>
/// <param name="period">The period over which to calculate the Mean Squared Error.</param>
public Mse(object source, int period) : this(period)
{
var pubEvent = source.GetType().GetEvent("Pub");
pubEvent?.AddEventHandler(source, new ValueSignal(Sub));
}
/// <summary>
/// Initializes the Mse instance by clearing the buffers.
/// </summary>
@@ -54,7 +54,6 @@ public class Mse : AbstractBase
_predictedBuffer.Clear();
}
/// <summary>
/// Manages the state of the Mse instance based on whether new values are being processed.
/// </summary>
@@ -108,17 +107,4 @@ public class Mse : AbstractBase
IsHot = _index >= WarmupPeriod;
return mse;
}
/// <summary>
/// Calculates the Mean Squared Error for the given actual and predicted values.
/// </summary>
/// <param name="actual">The actual value.</param>
/// <param name="predicted">The predicted value.</param>
/// <returns>The calculated Mean Squared Error.</returns>
public double Calc(double actual, double predicted)
{
Input = new TValue(DateTime.Now, actual);
_lastValidValue = predicted;
return Calculation();
}
}