remove unused exception

This commit is contained in:
Arkadiusz Kondas 2016-07-24 13:52:52 +02:00
parent a298bdc8de
commit 448eaafd78
3 changed files with 18 additions and 9 deletions

View File

@ -3,10 +3,15 @@ CHANGELOG
This changelog references the relevant changes done in PHP-ML library.
* 0.1.2 (in plan/progress)
* 0.1.3 (in plan/progress)
* SSE, SSTo, SSR [Regression] - sum of the squared
*
* 0.1.2 (2016-07-24)
* feature [Dataset] - FilesDataset - load dataset from files (folder names as targets)
* feature [Metric] - ClassificationReport - report about trained classifier
* bug [Feature Extraction] - fix problem with token count vectorizer array order
* tests [General] - add more tests for specific conditions
* 0.1.1 (2016-07-12)
* feature [Cross Validation] Stratified Random Split - equal distribution for targets in split

View File

@ -13,12 +13,5 @@ class NormalizerException extends \Exception
{
return new self('Unknown norm supplied.');
}
/**
* @return NormalizerException
*/
public static function fitNotAllowed()
{
return new self('Fit is not allowed for this preprocessor.');
}
}

View File

@ -10,6 +10,7 @@ use Phpml\Pipeline;
use Phpml\Preprocessing\Imputer;
use Phpml\Preprocessing\Normalizer;
use Phpml\Preprocessing\Imputer\Strategy\MostFrequentStrategy;
use Phpml\Regression\SVR;
class PipelineTest extends \PHPUnit_Framework_TestCase
{
@ -26,6 +27,16 @@ class PipelineTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($estimator, $pipeline->getEstimator());
}
public function testPipelineEstimatorSetter()
{
$pipeline = new Pipeline([new TfIdfTransformer()], new SVC());
$estimator = new SVR();
$pipeline->setEstimator($estimator);
$this->assertEquals($estimator, $pipeline->getEstimator());
}
public function testPipelineWorkflow()
{
$transformers = [