[SciPy-User] ODR and full output puzzle

Robert Kern robert.kern@gmail....
Sat Apr 10 17:57:20 CDT 2010


On Sat, Apr 10, 2010 at 12:55, ms <devicerandom@gmail.com> wrote:
> Hi,
>
> I am using ODR for a program and I now would like to have the optional
> attributes in the output from the fit, as described here (In particular,
> I'd like to have the sum of squares error):
>
> http://www.scipy.org/doc/api_docs/SciPy.odr.odrpack.Output.html
>
> The documentation there says such parameters:
>
> " [are] Present if odr() was run with "full_output=1"."
>
> Well, problem is that nothing in the documentation (no examples,
> nothing) mentions running odr(), that help(scipy.odr.odr) returns
> nothing except a terse list of parameters, that no other documentation
> is also available online about this function and in fact I do my fits
> since years with ODR without having ever run odr(). All I can find on
> the function is the bottom lines of this page:
>
> http://docs.scipy.org/doc/scipy/reference/odr.html
>
> which doesn't help a lot, as you can see.
>
> Does anyone know what does this function do and how to obtain the full
> output?

Hmm. The docstring is in an older style, so it doesn't seem to be
parsed correctly by the web doc app. Anyways, all of the attributes
are fully described in the docstring:

class Output(object):
    """ The Output class stores the output of an ODR run.

    Takes one argument for initialization: the return value from the
    function odr().

    Attributes
    ----------
      beta -- estimated parameter values [beta.shape == (q,)]

      sd_beta -- standard errors of the estimated parameters
                 [sd_beta.shape == (p,)]

      cov_beta -- covariance matrix of the estimated parameters
                  [cov_beta.shape == (p, p)]

    Optional Attributes
    -------------------
    Present if odr() was run with "full_output=1".

      delta -- array of estimated errors in input variables
               [delta.shape == data.x.shape]

      eps -- array of estimated errors in response variables
             [eps.shape == data.y.shape]

      xplus -- array of x + delta [xplus.shape == data.x.shape]

      y -- array of y = fcn(x + delta) [y.shape == data.y.shape]

      res_var -- residual variance [scalar]

      sum_sqare -- sum of squares error [scalar]

      sum_square_delta -- sum of squares of delta error [scalar]

      sum_square_eps -- sum of squares of eps error [scalar]

      inv_condnum -- inverse condition number [scalar] (cf. ODRPACK UG p. 77)

      rel_error -- relative error in function values computed within
fcn [scalar]

      work -- final work array [array]

      work_ind -- indices into work for drawing out values [dictionary]
                  (cf. ODRPACK UG p. 83)

      info -- reason for returning (as output by ODRPACK) [integer]
              (cf. ODRPACK UG p. 38)

      stopreason -- "info" interpreted into English [list of strings]
    """

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco


More information about the SciPy-User mailing list