The loss function is a function of the learning system's output and the "Ground Truth" that you want to reduce. In the case of regression problems, the RMSE is an appropriate loss function.

The RMSE isn't a good loss function to use in classification applications.

The square root of the difference between your true and anticipated dependent variables is known as root mean square error.

What is the purpose of taking the square root? You may receive negative and positive numbers if the difference between true and expected is discovered. If you add up those differences, you'll get zero, which isn't useful.The disparity between true and predicted is what the loss function is all about. If a continuous dependent variable exists, RMSE is calculated (usually in the case of Regression problems).