boost accumulators library - how to find "Mode" and "r-squared"?

240 Views Asked by At

I have vector of doubles and need to find "mode" and "r-squared" values using boost library. I can find mean, min/max, count, variance using boost::accumulators but can't find anything for "mode" or "r-square" values in there.

Perhaps "accumulators" is not the library within boost that I should be using?

Any help will be greatly appreciated.

Thanks!

1

There are 1 best solutions below

0
Michael EstrinOne On

In case someone else makes the same mistake:

R-square (coefficient of determination) is just a correlation*correlation. And correlation, of course, is part of boost accumulators library.

I did not read the definition of r-square carefully enough, silly me.