Orange Forum • View topic - Wrong MSE formula on orngStat

## Wrong MSE formula on orngStat

Report bugs (or imagined bugs).
(Archived/read-only, please use our ticketing system for reporting bugs and their discussion.)
Forum rules
Archived/read-only, please use our ticketing system for reporting bugs and their discussion.

### Wrong MSE formula on orngStat

On the method MSE of orngStat, the calculation of RMSE (when given the argkw "sqrt") it calculates the RMSE by making the squared root of the sum of the squared errors, and then divide it by the number of examples.
Instead, at least I suppose, it should calculates the RMSE by dividing the the sum of the squared errors by the number of examples and, only then, make the squared root of it.

Citation from http://www.statsoft.com/textbook/glosr.html:
To calculate the RMS (root mean squared) error, the individual errors are squared, added together, divided by the number of individual errors, and then square rooted.

So around line 125 it is:

Code: Select all
`if argkw.get("sqrt", 0):    MSEs = [math.sqrt(x) for x in MSEs]return [x/totweight for x in MSEs]`

`if argkw.get("sqrt", 0):    MSEs = [x/totweight for x in MSEs]    return [math.sqrt(x) for x in MSEs]return [x/totweight for x in MSEs]`