Class MeanSquaredErrorLoss
- Namespace
- NeuralNetworks.Losses
- Assembly
- NeuralNetworks.dll
Represents a loss function that computes the mean squared error between predicted and target values.
public class MeanSquaredErrorLoss : Loss<float[,]>
- Inheritance
-
MeanSquaredErrorLoss
- Inherited Members
Remarks
This class is typically used in regression tasks (for example, Boston Housing dataset, Sine wave prediction) to measure the average squared difference between predicted and actual values. It can be used as a loss function in training neural networks or other predictive models where minimizing the mean squared error is desired.
Methods
CalculateLoss()
protected override float CalculateLoss()
Returns
CalculateLossGradient()
protected override float[,] CalculateLossGradient()
Returns
- float[,]
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.