Welcome to our Support Center



Computes the mean of squares of errors between labels and predictions.​ Type : polymorphic.




Input parameters


MeanSquaredError in : class
reduction : enum, type of reduction to apply to the loss. In almost all cases this should be “Sum over Batch“.


Output parameters


MeanSquaredError out : class

Required data

Β y_pred :Β array,Β predicted values.
Β y_true :Β array,Β true values.

Use cases

Mean Squared Error (MSE) is a loss function commonly used in regression problems. It calculates the average of the squares of the differences between predictions and actual values. This metric is favorable when a greater penalty for larger errors is desired, as larger deviations are amplified by the square of the differences.

MSE is particularly suitable for models where minimizing the impact of large errors is crucial and where prediction accuracy is critical, such as in financial predictions or weather modeling.


All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install HAIBAL library to run it).

Table of Contents