Finds the k-dimension linear curve values and the set of k-dimension linear fit coefficients, which describe the k-dimension linear curve that best represents the input data set using the Least Square, Least Absolute Residual, or Bisquare method.


icon

Inputs/Outputs

  • cenum.png covariance selector

    covariance selector indicates whether the VI computes the covariance matrix.

  • c1ddbl.png Y

    Y is the observed data set Y. The number of elements in Y must equal the number of rows in H.

  • c2ddbl.png H

    H is the matrix that represents the formula you use to fit the data set (X, Y). Hij are the function values of Xi.

  • c1ddbl.png Weight

    Weight is the array of weights for the observations Y. Weight must be the same size as Y. If you do not wire an input to Weight, this VI sets all elements of Weight to 1.

  • cdbl.png tolerance

    tolerance determines when to stop the iterative adjustment of Coefficients when you use the Least Absolute Residual or Bisquare methods. For the Least Absolute Residual method, if the relative difference of the weighted mean error of the polynomial fit in two successive iterations is less than tolerance, this VI returns the resulting Polynomial Coefficients. For the Bisquare method, if any relative difference between Polynomial Coefficients in two successive iterations is less than tolerance, this VI returns the resulting Polynomial Coefficients.

  • cu16.png method

    method specifies the fitting method.

  • cu16.png algorithm

    algorithm specifies the algorithm this VI uses to compute Best Fit. Use the SVD for Rank Deficient H algorithm only if H is rank deficient or does not have a full rank and if all other algorithms are unsuccessful.

  • i1ddbl.png Best Fit

    Best Fit is the fitted data computed by using Coefficients.

  • i1ddbl.png Coefficients

    Coefficients is the set of coefficients that minimize chi squared.

  • i2ddbl.png Covariance

    Covariance is the matrix of covariance C with k-by-k elements.

  • i1ddbl.png Weight Out

    Weight Out returns the actual weight of general linear fitting if method is Bisquare. If method is Least Square or Least Absolute Residual, Weight Out returns the value you enter for Weight.

  • ii32.png error

    error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

  • idbl.png residue

    residue returns the weighted mean error of the fitted model. If method is Least Absolute Residual, residue is the weighted mean absolute error. Otherwise, residue is the weighted mean square error.