Boost logo

Boost :

From: Niitsuma Hirotaka (hirotaka.niitsuma_at_[hidden])
Date: 2007-01-30 04:10:09

Boost.Accumulators is quit useful library.
Until I find this library, I had used Torch
Torch also provides general framework for various statistical and
machine-learning methods.
Boost.Accumulators is more general framework.
And also we can easily describe various statistical methods.
In this framework, the statistical methods become readable components.
(Torch's components are not readable)

But, in order to add a component requires covarite input, we need to
modify statistics_fwd.hpp.
(When I described join_histgram component, I need to modify
statistics_fwd.hpp and depended other components density.hpp and so on .)
I think this is not good.
If possible, just add a file which describes a statistical method, and
include the file, is better.

It is seem to similar framework can be given by boost::signal
boost::signal1<void, double> sig;
sig.connect( &mean );
sig.connect( &variant );
sig.connect( &sum );
for_each(vec.begin(),vec.end(),boost::bind<void>( boost::ref(sig ),_1) );

In this case, we can add new components by just adding file.

But Boost.Accumulators is better than boost::signal in many points.

can describe dependency among components
can divide incremental part and final part.
Document is good.

I will switch Torch to Boost.Accumulators.

I can not find way bind covarite1.
Plz give example for bind covarite1
The following code has compile error.

double d=0.0;
accumulators::accumulator_set<double, accumulators::stats<
accumulators::tag::covariance<double , accumulators::tag::covariate1> > >
acc(accumulators::sample = d,accumulators::covariate1 = d);

    boost::make_tuple(beg1, beg2)
    boost::make_tuple(end1, end2)
boost::bind<void>( boost::ref(acc),(_1, accumulators::covariate1 = _2 ) )

Boost list run by bdawes at, gregod at, cpdaniel at, john at