Feature SS-3544
1 vote

[Maxima] Provide MSE() and Residuals() functions

Created by Martin Kraska on 7/23/2018 5:10 PM Last Updated by Martin Kraska on 9/4/2018 12:05 AM
%
 (hrs)
Logged: 0   (hrs)

 Description

Residuals() based on lsquares_residuals (D, x, e, a)

Returns the residuals for the equation e with specified parameters a and data D.

D is a matrix, x is a list of variables, e is an equation or general expression; if not an equation, e is treated as if it were e = 0. a is a list of equations which specify values for any free parameters in e aside from x.

The residuals are defined as:

                        lhs(e ) - rhs(e )
                             i         i

where e[i] is the equation e evaluated with the variables in x assigned values from the i-th datum, D[i], and assigning any remaining free variables from a.

MSE() based on lsquares_residual_mse (D, x, e, a)

Returns the residual mean square error (MSE) for the equation e with specified parameters a and data D.

The residual MSE is defined as:

                    n
                   ====
               1   \                        2
               -    >    (lhs(e ) - rhs(e ))
               n   /           i         i
                   ====
                   i = 1

where e[i] is the equation e evaluated with the variables in x assigned values from the i-th datum, D[i], and assigning any remaining free variables from a.

    Martin Kraska (Tuesday, September 4, 2018 12:05 AM) #

Implemented in SVN 2740