Go to the documentation of this file. 44 using namespace shark;
47 int main(
int argc,
char **argv) {
49 cerr <<
"usage: " << argv[0] <<
" (file with inputs/independent variables) (file with outputs/dependent variables)" << endl;
58 cerr <<
"unable to read input data from file " << argv[1] << endl;
66 cerr <<
"unable to read labels from file " << argv[2] << endl;
79 trainer.
train(model, data);
82 cout <<
"intercept: " << model.
offset() << endl;
83 cout <<
"matrix: " << model.
matrix() << endl;
87 cout <<
"squared loss: " << loss(data.
labels(), prediction) << endl;