Signature | Description | Parameters |
---|---|---|
#include <DataFrame/DataFrameStatsVisitors.h> template<typename T, typename I = unsigned long> struct CorrVisitor; |
This functor class calculates the correlation of two given columns.explicit CorrVisitor (bool bias = true); |
T: Column data type. T must be an arithmetic-enabled type I: Index type. |
std::cout << "\nTesting Correlation Visitor ..." << std::endl; CorrVisitor<double> corr_visitor; auto fut10 = df.visit_async<double, double>("dbl_col", "dbl_col_2", corr_visitor); const double corr = fut10.get().get_result(); assert(fabs(corr - -0.358381) < 0.000001);