bundles / scipy 1.17.1 / scipy / odr / _odrpack / RealData
class
scipy.odr._odrpack:RealData
source: /scipy/odr/_odrpack.py :320
Signature
class RealData ( x , y = None , sx = None , sy = None , covx = None , covy = None , fix = None , meta = None ) Members
Summary
The data, with weightings as actual standard deviations and/or covariances.
Extended Summary
Parameters
x: array_likeObserved data for the independent variable of the regression
y: array_like, optionalIf array-like, observed data for the dependent variable of the regression. A scalar input implies that the model to be used on the data is implicit.
sx: array_like, optionalStandard deviations of
x.sxare standard deviations ofxand are converted to weights by dividing 1.0 by their squares.sy: array_like, optionalStandard deviations of
y.syare standard deviations ofyand are converted to weights by dividing 1.0 by their squares.covx: array_like, optionalCovariance of
xcovxis an array of covariance matrices ofxand are converted to weights by performing a matrix inversion on each observation's covariance matrix.covy: array_like, optionalCovariance of
ycovyis an array of covariance matrices and are converted to weights by performing a matrix inversion on each observation's covariance matrix.fix: array_like, optionalThe argument and member fix is the same as Data.fix and ODR.ifixx: It is an array of integers with the same shape as
xthat determines which input observations are treated as fixed. One can use a sequence of length m (the dimensionality of the input observations) to fix some dimensions for all observations. A value of 0 fixes the observation, a value > 0 makes it free.meta: dict, optionalFree-form dictionary for metadata.
Notes
The weights wd and we are computed from provided values as follows:
sx and sy are converted to weights by dividing 1.0 by their squares. For example, wd = 1./np.power(`sx`, 2).
covx and covy are arrays of covariance matrices and are converted to weights by performing a matrix inversion on each observation's covariance matrix. For example, we[i] = np.linalg.inv(covy[i]).
These arguments follow the same structured argument conventions as wd and we only restricted by their natures: sx and sy can't be rank-3, but covx and covy can be.
Only set either sx or covx (not both). Setting both will raise an exception. Same with sy and covy.
Aliases
-
scipy.odr.RealData