Table Of Contents

Goodness of Fit (G Dataflow)

Last Modified: January 12, 2018

Calculates three statistical parameters that describe how well a fitted model matches the original data set.

connector_pane_image
datatype_icon

y

Array of dependent values of the original data set. The number of elements in y must be greater than degree of freedom.

datatype_icon

best fit

Array of dependent values of the fitted model. best fit must be the same size as y.

datatype_icon

weight

Weights for the observations.

weight must be the same size as y. If you do not wire an input to weight, this node sets all elements of weight to 1. If an element in weight is less than 0, this node uses the absolute value of the element.

datatype_icon

degree of freedom

Length of the array of dependent values of the original data set minus the number of coefficients in the fitted model. If degree of freedom is less than or equal to 0, this node sets degree of freedom to the length of y minus 2.

Default: -1

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

SSE

Summation of square error. The smaller the SSE, the better the fit.

datatype_icon

R-square

A normalized parameter to measure the goodness of fit. The closer to 1 the R-square, the better the fit.

datatype_icon

RMSE

Root mean square error. The smaller the RMSE, the better the fit.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Algorithm for Calculating the Statistical Parameters

The statistical parameters SSE, R-square, and RMSE are defined by the following equations:

SSE = i = 0 n 1 w i ( y i f i ) 2
R square = 1 S S E S S T
R M S E = S S E D O F

where

  • wi is the ith element of weight
  • yi is the ith element of y
  • fi is the ith element of best fit
  • S S T = i = 0 n 1 w i ( y i y ¯ ) 2
  • y ¯ is the mean value of y
  • DOF is the degree of freedom

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics