package scipy

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val get_py : string -> Py.Object.t

Get an attribute of this module as a Py.Object.t. This is useful to pass a Python function to another function.

module Data : sig ... end
module Model : sig ... end
module ODR : sig ... end
module OdrError : sig ... end
module OdrStop : sig ... end
module OdrWarning : sig ... end
module Output : sig ... end
module RealData : sig ... end
module Models : sig ... end
module Odrpack : sig ... end
val odr : ?we:Py.Object.t -> ?wd:Py.Object.t -> ?fjacb:Py.Object.t -> ?fjacd:Py.Object.t -> ?extra_args:Py.Object.t -> ?ifixx:Py.Object.t -> ?ifixb:Py.Object.t -> ?job:Py.Object.t -> ?iprint:Py.Object.t -> ?errfile:Py.Object.t -> ?rptfile:Py.Object.t -> ?ndigit:Py.Object.t -> ?taufac:Py.Object.t -> ?sstol:Py.Object.t -> ?partol:Py.Object.t -> ?maxit:Py.Object.t -> ?stpb:Py.Object.t -> ?stpd:Py.Object.t -> ?sclb:Py.Object.t -> ?scld:Py.Object.t -> ?work:Py.Object.t -> ?iwork:Py.Object.t -> ?full_output:Py.Object.t -> fcn:Py.Object.t -> beta0:Py.Object.t -> y:Py.Object.t -> x:Py.Object.t -> unit -> Py.Object.t

odr(fcn, beta0, y, x, we=None, wd=None, fjacb=None, fjacd=None, extra_args=None, ifixx=None, ifixb=None, job=0, iprint=0, errfile=None, rptfile=None, ndigit=0, taufac=0.0, sstol=-1.0, partol=-1.0, maxit=-1, stpb=None, stpd=None, sclb=None, scld=None, work=None, iwork=None, full_output=0)

Low-level function for ODR.

See Also -------- ODR : The ODR class gathers all information and coordinates the running of the main fitting routine. Model : The Model class stores information about the function you wish to fit. Data : The data to fit. RealData : Data with weights as actual std. dev.s and/or covariances.

Notes ----- This is a function performing the same operation as the `ODR`, `Model`, and `Data` classes together. The parameters of this function are explained in the class documentation.

val polynomial : [ `I of int | `Sequence of Py.Object.t ] -> Py.Object.t

Factory function for a general polynomial model.

Parameters ---------- order : int or sequence If an integer, it becomes the order of the polynomial to fit. If a sequence of numbers, then these are the explicit powers in the polynomial. A constant term (power 0) is always included, so don't include 0. Thus, polynomial(n) is equivalent to polynomial(range(1, n+1)).

Returns ------- polynomial : Model instance Model instance.

Examples -------- We can fit an input data using orthogonal distance regression (ODR) with a polynomial model:

>>> import matplotlib.pyplot as plt >>> from scipy import odr >>> x = np.linspace(0.0, 5.0) >>> y = np.sin(x) >>> poly_model = odr.polynomial(3) # using third order polynomial model >>> data = odr.Data(x, y) >>> odr_obj = odr.ODR(data, poly_model) >>> output = odr_obj.run() # running ODR fitting >>> poly = np.poly1d(output.beta::-1) >>> poly_y = poly(x) >>> plt.plot(x, y, label='input data') >>> plt.plot(x, poly_y, label='polynomial ODR') >>> plt.legend() >>> plt.show()

OCaml

Innovation. Community. Security.