#include "daal.h"
#include "service.h"
using namespace std;
using namespace daal;
using namespace algorithms;
string datasetFileName = "../data/batch/outlierdetection.csv";
int main(int argc, char *argv[])
{
checkArguments(argc, argv, 1, &datasetFileName);
FileDataSource<CSVFeatureManager> dataSource(datasetFileName, DataSource::doAllocateNumericTable,
DataSource::doDictionaryFromContext);
dataSource.loadDataBlock();
size_t nFeatures = dataSource.getNumberOfColumns();
univariate_outlier_detection::Batch<> algorithm;
algorithm.input.set(univariate_outlier_detection::data, dataSource.getNumericTable());
algorithm.compute();
univariate_outlier_detection::ResultPtr res = algorithm.getResult();
printNumericTable(dataSource.getNumericTable(), "Input data");
printNumericTable(res->get(univariate_outlier_detection::weights), "Outlier detection result (univariate)");
return 0;
}