#include "daal.h"
#include "service.h"
using namespace std;
using namespace daal;
using namespace daal::algorithms;
const string datasetFileName = "../data/batch/covcormoments_dense.csv";
int main(int argc, char *argv[])
{
checkArguments(argc, argv, 1, &datasetFileName);
FileDataSource<CSVFeatureManager> dataSource(datasetFileName, DataSource::doAllocateNumericTable,
DataSource::doDictionaryFromContext);
dataSource.loadDataBlock();
covariance::Batch<> algorithm;
algorithm.input.set(covariance::data, dataSource.getNumericTable());
algorithm.compute();
services::SharedPtr<covariance::Result> res = algorithm.getResult();
printNumericTable(res->get(covariance::covariance), "Covariance matrix:");
printNumericTable(res->get(covariance::mean), "Mean vector:");
return 0;
}