# How can RMSE be compared between a regression model and a neural network model?

In the calculation of RMSE, linear regression uses degrees of freedom(n-p) as divisor and neural network(feed-forward in my case) uses the total data number(does it have degrees of freedom as well?). It is 'unfair' to use RMSE to compare which one has a better fit to the data response because linear regression alone suffers a 'punishment'. But RMSE has a clear definition to get an unbiased estimator in regression. If I use the 2nd formula for both models, I changed its definition for regression. Residual sum of square is comparable but it is a summation and doesn't show the deviation in single point level. Are there better ways to compare the result of linear regression and neural network?

I save the cross-validation problem for future. Only training data are discussed here.

• Both wikipedia and matlab-mbcbox use degrees of freedom to calculate RMSE. It's the same reason why standard deviation uses a divisor of (n-1) instead of n. – reko34 Jan 21 at 2:30
• en.wikipedia.org/wiki/Errors_and_residuals – reko34 Jan 21 at 2:30
• In future please include a log of edits made to the original question. – André.B Jan 22 at 21:36