Boost logo

Boost Users :

Subject: Re: [Boost-users] covariance calculus via boost::accumulators
From: Rhys Ulerich (rhys.ulerich_at_[hidden])
Date: 2009-11-25 13:12:41


On Mon, Nov 23, 2009 at 8:33 AM, Conoscenza Silente <
abruzzoforteegentile_at_[hidden]> wrote:

> I would like to calculate the covariance of 2 variables.
>

> I did not really understand how to setup the accumulators for 2 or
> more variables.
>
> What role plays the covariate here and where to pick up or feed the
> values for the second variable?
>

I'm not sure if it accomplishes exactly what you want, but the attached
sample may be useful. It is a little program to compute some stats from an
input file. It includes covariance details.

It uses autoconf and assumes you're on a un*x-ish system or Cygwin, so
you'll want to use ./bootstrap && ./configure && make. The file you're
after is src/stat.cc.

- Rhys





Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net