Skip to content

Commit

Permalink
SVMRegression: Simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Mar 25, 2024
1 parent 42e31db commit 9f3eab6
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions lib/test/t_SVMRegression_std.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,13 @@ int main(int /*argc*/, char ** /*argv*/)

for(int i = 0; i < 100; i++)
{
Point a(1);
a[0] = i + 1;
Point b(2);
b[0] = 2 * (i + 1);
b[1] = i + 4;
dataIn[i] = a;
dataOut[i] = b;
dataIn(i, 0) = i + 1.0;
dataOut[i] = Point({2.0 * (i + 1.0), i + 4.0});
}


Point cp(2);
cp[0] = 5;
cp[1] = 10;

Point gamma(5);
gamma[1] = 0.1;
gamma[0] = 0.001;
gamma[2] = 10;
gamma[3] = 100;
gamma[4] = 1;


const Point cp = {5.0, 10.0};
const Point gamma = {0.001, 0.1, 10.0, 100.0, 1.0};

LibSVM::KernelType kernel = LibSVM::NormalRbf;
OTSVM::SVMRegression regression(dataIn, dataOut, kernel);
Expand Down

0 comments on commit 9f3eab6

Please sign in to comment.