Package gmisclib :: Module s_lin_fit
[frames] | no frames]

Module s_lin_fit

source code

Fit a plane to some data.

Classes
  Error
  NoDataError
Functions
 
plane(data, wt=None)
Fit a plane to some data.
source code
 
test() source code
Variables
  __package__ = 'gmisclib'

Imports: g_lin_fit, Num


Function Details

plane(data, wt=None)

source code 

Fit a plane to some data. where the fitting function is f = c[0]*1 + c[1]*dep[0] + c[2]*dep[1] + ... where c is the array of coefficients. The length of c is equal to the number of dependent variables in each datum.

Parameters:
  • data - [ (independent, dependent, dependent...), ...]
Returns:
(c, opt, resid, rank, sv), where bestfit is the best fit to the data (i.e., the values of f), resid is the residual (a single float number), rank the rank of the fit (int), and sv is the array of the singular values.