package scipy

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tag = [
  1. | `RealData
]
type t = [ `Object | `RealData ] Obj.t
val of_pyobject : Py.Object.t -> t
val to_pyobject : [> tag ] Obj.t -> Py.Object.t
val create : ?y:[> `Ndarray ] Np.Obj.t -> ?sx:[> `Ndarray ] Np.Obj.t -> ?sy:[> `Ndarray ] Np.Obj.t -> ?covx:[> `Ndarray ] Np.Obj.t -> ?covy:[> `Ndarray ] Np.Obj.t -> ?fix:[> `Ndarray ] Np.Obj.t -> ?meta:Py.Object.t -> x:[> `Ndarray ] Np.Obj.t -> unit -> t

The data, with weightings as actual standard deviations and/or covariances.

Parameters ---------- x : array_like Observed data for the independent variable of the regression y : array_like, optional If 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, optional Standard deviations of `x`. `sx` are standard deviations of `x` and are converted to weights by dividing 1.0 by their squares. sy : array_like, optional Standard deviations of `y`. `sy` are standard deviations of `y` and are converted to weights by dividing 1.0 by their squares. covx : array_like, optional Covariance of `x` `covx` is an array of covariance matrices of `x` and are converted to weights by performing a matrix inversion on each observation's covariance matrix. covy : array_like, optional Covariance of `y` `covy` is an array of covariance matrices and are converted to weights by performing a matrix inversion on each observation's covariance matrix. fix : array_like, optional The argument and member fix is the same as Data.fix and ODR.ifixx: It is an array of integers with the same shape as `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 : dict, optional Free-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./numpy.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, ``wei = numpy.linalg.inv(covyi)``.

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`.

val set_meta : ?kwds:(string * Py.Object.t) list -> [> tag ] Obj.t -> Py.Object.t

Update the metadata dictionary with the keywords and data provided by keywords.

Examples -------- ::

data.set_meta(lab='Ph 7; Lab 26', title='Ag110 + Ag108 Decay')

val to_string : t -> string

Print the object to a human-readable representation.

val show : t -> string

Print the object to a human-readable representation.

val pp : Stdlib.Format.formatter -> t -> unit

Pretty-print the object to a formatter.