|
Boost Users : |
Subject: Re: [Boost-users] covariance calculus via boost::accumulators
From: Conoscenza Silente (abruzzoforteegentile_at_[hidden])
Date: 2009-11-23 09:33:54
Hi All
I would like to calculate the covariance of 2 variables.
I found that in Boost there is boost::accumulators and the
Statistical Accumulators Library that looks good to me.
Covariance is a measure of how much two variables
change together, but in the example given by boost ( I am guessing)
I see only an example for one variable.
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?
Thanks to all
accumulator_set<double, stats<tag::covariance<double, tag::covariate1> > > acc;
acc(1., covariate1 = 2.);
acc(1., covariate1 = 4.);
acc(2., covariate1 = 3.);
acc(6., covariate1 = 1.);
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