### Navigation

- index
- modules |
- modules |
- SciPy v0.9 Reference Guide (DRAFT) »
- Orthogonal distance regression (`scipy.odr`) »

# scipy.odr.Data

class `scipy.odr.``Data`(x, y=None, we=None, wd=None, fix=None, meta={})

  The Data class stores the data to fit.

  Each argument is attached to the member of the instance of the same name. The structures of x and y are described in the Model class docstring. If y is an integer, then the Data instance can only be used to fit with implicit models where the dimensionality of the response is equal to the specified value of y. The structures of wd and we are described below. meta is an freeform dictionary for application-specific use.

  we weights the effect a deviation in the response variable has on the fit. wd weights the effect a deviation in the input variable has on the fit. To handle multidimensional inputs and responses easily, the structure of these arguments has the n’th dimensional axis first. These arguments heavily use the structured arguments feature of ODRPACK to conveniently and flexibly support all options. See the ODRPACK User’s Guide for a full explanation of how these weights are used in the algorithm. Basically, a higher value of the weight for a particular data point makes a deviation at that point more detrimental to the fit.

  > we – if we is a scalar, then that value is used for all data points (and

  >   all dimensions of the response variable).

  >   If we is a rank-1 array of length q (the dimensionality of the response variable), then this vector is the diagonal of the covariant weighting matrix for all data points.

  >   If we is a rank-1 array of length n (the number of data points), then the i’th element is the weight for the i’th response variable observation (single-dimensional only).

  >   If we is a rank-2 array of shape (q, q), then this is the full covariant weighting matrix broadcast to each observation.

  >   If we is a rank-2 array of shape (q, n), then we[:,i] is the diagonal of the covariant weighting matrix for the i’th observation.

  >   If we is a rank-3 array of shape (q, q, n), then we[:,:,i] is the full specification of the covariant weighting matrix for each observation.

  >   If the fit is implicit, then only a positive scalar value is used.

  > wd – if wd is a scalar, then that value is used for all data points

  >   (and all dimensions of the input variable). If wd = 0, then the covariant weighting matrix for each observation is set to the identity matrix (so each dimension of each observation has the same weight).

  >   If wd is a rank-1 array of length m (the dimensionality of the input variable), then this vector is the diagonal of the covariant weighting matrix for all data points.

  >   If wd is a rank-1 array of length n (the number of data points), then the i’th element is the weight for the i’th input variable observation (single-dimensional only).

  >   If wd is a rank-2 array of shape (m, m), then this is the full covariant weighting matrix broadcast to each observation.

  >   If wd is a rank-2 array of shape (m, n), then wd[:,i] is the diagonal of the covariant weighting matrix for the i’th observation.

  >   If wd is a rank-3 array of shape (m, m, n), then wd[:,:,i] is the full specification of the covariant weighting matrix for each observation.

  > fix – fix is the same as ifixx in the class ODR. It is an array of integers
  >   with the same shape as data.x that 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 – optional, freeform dictionary for metadata

  Methods

  `set_meta` |

### Navigation

- index
- modules |
- modules |
- SciPy v0.9 Reference Guide (DRAFT) »
- Orthogonal distance regression (`scipy.odr`) »