| Signature | Description | Parameters |
|---|---|---|
#include<DataFrame/DataFrameStatsVisitors.h>template<typename T,typename I=unsignedlong>struct SEMVisitor;// -------------------------------------template<typename T,typename I=unsignedlong>using sem_v= SEMVisitor<T, I>; | This functor class calculates the Standard Error of the Mean for a given column.explicit SEMVisitor (bool bias = true); | T: Column data type. I: Index type. |
staticvoid test_SEMVisitor(){std::cout<<"\nTesting SEMVisitor{ } ..."<<std::endl;std::vector<unsignedlong> idx={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,31,32,33,34,35,36,37,38,39,40};std::vector<double> d1={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40}; MyDataFrame df; df.load_data(std::move(idx),std::make_pair("col_1", d1)); SEMVisitor<double> sem_visitor;constauto result= df.visit<double>("col_1", sem_visitor).get_result(); assert(fabs(result-1.84842)<0.00001);}