#include "daal.h"
#include "service.h"
using namespace std;
using namespace daal;
using namespace daal::algorithms;
using namespace daal::algorithms::normalization;
string datasetName = "../data/batch/normalization.csv";
int main()
{
FileDataSource<CSVFeatureManager> dataSource(datasetName, DataSource::doAllocateNumericTable, DataSource::doDictionaryFromContext);
dataSource.loadDataBlock();
NumericTablePtr data = dataSource.getNumericTable();
minmax::Batch<float, minmax::defaultDense> algorithm;
algorithm.parameter.lowerBound = -1.0;
algorithm.parameter.upperBound = 1.0;
algorithm.input.set(minmax::data, data);
algorithm.compute();
minmax::ResultPtr res = algorithm.getResult();
printNumericTable(data, "First 10 rows of the input data:", 10);
printNumericTable(res->get(minmax::normalizedData), "First 10 rows of the min-max normalization result:", 10);
return 0;
}