SG++
MinerFromConfigFile.cpp

This example can be found under datadriven/examples/MinerFromConfigFile.cpp.

/*
* Copyright (C) 2008-today The SG++ project
* This file is part of the SG++ project. For conditions of distribution and
* use, please see the copyright notice provided with SG++ or at
* sgpp.sparsegrids.org
*
* MinerPrototype.cpp
*
* Created on: Oct 7, 2016
* Author: Michael Lettrich
*/
#include <cstdlib>
#include <iostream>
#include <memory>
#include <string>
int main(int argc, char **argv) {
const std::string path = [argc, &argv]() {
if (argc != 2) {
std::cout << "No or bad path given, aborting\n";
exit(1);
return std::string{};
} else {
return std::string{argv[1]};
}
}();
LeastSquaresRegressionMinerFactory factory;
auto miner = std::unique_ptr<SparseGridMiner>(factory.buildMiner(path));
miner->learn();
}