Beispiel #1
0
 public function testComplexCase()
 {
     $r = new LinearRegression(Dataset::fromArray([0.5, 1, 4, -1]));
     $this->assertSame(-0.15, $r->slope());
     $this->assertSame(1.35, $r->intercept());
     $this->assertSame(0.0, $r(9));
 }