25 #include <boost/numeric/ublas/matrix_proxy.hpp> 30 Dataset::Dataset(): mMinIndex(0), mMaxIndex(0) {};
32 Dataset::Dataset(
const matrixd& x,
const vectord& y):
33 mMinIndex(0), mMaxIndex(0)
38 Dataset::~Dataset(){};
40 void Dataset::setSamples(
const matrixd &x,
const vectord &y)
44 for (
size_t i=0; i<x.size1(); ++i)
46 mX.push_back(row(x,i));
51 void Dataset::setSamples(
const vectord &y)
54 for (
size_t i=0; i<y.size(); ++i)
61 void Dataset::setSamples(
const matrixd &x)
63 for (
size_t i=0; i<x.size1(); ++i)
65 mX.push_back(row(x,i));
69 void Dataset::plotData(TLogLevel level)
72 FILE_LOG(level) <<
"Initial points:" ;
73 for(
size_t i = 0; i < mY.size(); i++)
75 FILE_LOG(level) <<
"X:" << mX[i]
78 const double yPoint = getValueAtMinimum();
79 const vectord xPoint = getPointAtMinimum();
80 FILE_LOG(level) <<
"Best point so far:" ;
81 FILE_LOG(level) <<
"X:" << xPoint
Namespace of the library interface.