Errors
- get_l2_error(a, X=None, y=None, lam=None)
Computes the relative
\ell_2error for an approx objecta.If only
aandlamare provided, this function computes the relative\ell_2error on the training nodes for the specific regularization parameterlam.If
a,X,y, andlamare provided, this function computes the relative\ell_2error on the given dataXandyfor the specified regularization parameterlam.If only
ais provided, this function computes the relative\ell_2error on the training nodes for all available regularization parameters.If
a,X, andyare provided, this function computes the relative\ell_2error on the given dataXandyfor all available regularization parameters.
Returns either a float (for a single
lam) or a dictionary mappinglamvalues to errors.
- get_mse(a, X=None, y=None, lam=None)
Computes the mean square error (MSE) for an approx object
a.If only
aandlamare provided, this function computes the mean square error on the training nodes for a specific regularization parameterlam.If
a,X,y, andlamare provided, this function computes the mean square error on the given dataXandyfor the specified regularization parameterlam.If only
ais provided, this function computes the mean square error on the training nodes for all available regularization parameters.If
a,X, andyare provided, this function computes the mean square error on the given dataXandyfor all available regularization parameters.
Returns either a float (for a single
lam) or a dictionary mapping eachlamto its corresponding MSE value.
- get_mad(a, X=None, y=None, lam=None)
Computes the mean absolute deviation (MAD) for an approx object
a.If only
aandlamare provided, this function computes the mean absolute deviation on the training nodes for a specific regularization parameterlam.If
a,X,y, andlamare provided, this function computes the mean absolute deviation on the given dataXandyfor the specified regularization parameterlam.If only
ais provided, this function computes the mean absolute deviation on the training nodes for all available regularization parameters.If
a,X, andyare provided, this function computes the mean absolute deviation on the given dataXandyfor all available regularization parameters.
Returns a single MAD value (float), if
lamis provided, or a dictionary mapping eachlamto its corresponding MAD.
- get_L2_error(a, norm, bc_fun, lam=None)
Computes the relative L2 error of a function approximation for an
approxobjecta.If
a,norm,bc_fun, andlamare provided, this function computes the relative L2 error for a specific regularization parameterlam.If only
a,norm, andbc_funare provided, this function computes the relative L2 error for all available regularization parameters.