estimator = new PersistentModel(new GaussianNB(), new Filesystem('test.model'), new RBX()); } /** * @test */ public function build() : void { $this->assertInstanceOf(PersistentModel::class, $this->estimator); $this->assertInstanceOf(Probabilistic::class, $this->estimator); $this->assertInstanceOf(Scoring::class, $this->estimator); $this->assertInstanceOf(Learner::class, $this->estimator); $this->assertInstanceOf(Estimator::class, $this->estimator); } /** * @test */ public function type() : void { $this->assertEquals(EstimatorType::classifier(), $this->estimator->type()); } /** * @test */ public function compatibility() : void { $this->assertEquals([DataType::continuous()], $this->estimator->compatibility()); } /** * @test */ public function params() : void { $expected = [ 'base' => new GaussianNB(), 'persister' => new Filesystem('test.model'), 'serializer' => new RBX(), ]; $this->assertEquals($expected, $this->estimator->params()); } }