diff --git a/benchmarks/AnomalyDetectors/GaussianMLEBench.php b/benchmarks/AnomalyDetectors/GaussianMLEBench.php index 33e554d88..6324a959e 100644 --- a/benchmarks/AnomalyDetectors/GaussianMLEBench.php +++ b/benchmarks/AnomalyDetectors/GaussianMLEBench.php @@ -5,6 +5,7 @@ use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\AnomalyDetectors\GaussianMLE; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; /** * @Groups({"AnomalyDetectors"}) @@ -12,24 +13,15 @@ */ class GaussianMLEBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var GaussianMLE - */ - protected $estimator; + protected GaussianMLE $estimator; public function setUp() : void { diff --git a/benchmarks/AnomalyDetectors/IsolationForestBench.php b/benchmarks/AnomalyDetectors/IsolationForestBench.php index 33e162b02..5b2cdf5c8 100644 --- a/benchmarks/AnomalyDetectors/IsolationForestBench.php +++ b/benchmarks/AnomalyDetectors/IsolationForestBench.php @@ -5,6 +5,7 @@ use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\Datasets\Generators\Agglomerate; use Rubix\ML\AnomalyDetectors\IsolationForest; +use Rubix\ML\Datasets\Labeled; /** * @Groups({"AnomalyDetectors"}) @@ -12,24 +13,15 @@ */ class IsolationForestBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var IsolationForest - */ - protected $estimator; + protected IsolationForest $estimator; public function setUp() : void { diff --git a/benchmarks/AnomalyDetectors/LocalOutlierFactorBench.php b/benchmarks/AnomalyDetectors/LocalOutlierFactorBench.php index ac3b8397b..ba66487f6 100644 --- a/benchmarks/AnomalyDetectors/LocalOutlierFactorBench.php +++ b/benchmarks/AnomalyDetectors/LocalOutlierFactorBench.php @@ -5,6 +5,7 @@ use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\AnomalyDetectors\LocalOutlierFactor; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; /** * @Groups({"AnomalyDetectors"}) @@ -12,24 +13,15 @@ */ class LocalOutlierFactorBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var LocalOutlierFactor - */ - protected $estimator; + protected LocalOutlierFactor $estimator; public function setUp() : void { diff --git a/benchmarks/AnomalyDetectors/LodaBench.php b/benchmarks/AnomalyDetectors/LodaBench.php index 3b742217a..550f7ba3c 100644 --- a/benchmarks/AnomalyDetectors/LodaBench.php +++ b/benchmarks/AnomalyDetectors/LodaBench.php @@ -5,6 +5,7 @@ use Rubix\ML\AnomalyDetectors\Loda; use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; /** * @Groups({"AnomalyDetectors"}) @@ -12,24 +13,15 @@ */ class LodaBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var Loda - */ - protected $estimator; + protected Loda $estimator; public function setUp() : void { diff --git a/benchmarks/AnomalyDetectors/OneClassSVMBench.php b/benchmarks/AnomalyDetectors/OneClassSVMBench.php index 1d722c3dc..dc513b080 100644 --- a/benchmarks/AnomalyDetectors/OneClassSVMBench.php +++ b/benchmarks/AnomalyDetectors/OneClassSVMBench.php @@ -5,6 +5,7 @@ use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\AnomalyDetectors\OneClassSVM; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; /** * @Groups({"AnomalyDetectors"}) @@ -12,24 +13,15 @@ */ class OneClassSVMBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var OneClassSVM - */ - protected $estimator; + protected OneClassSVM $estimator; public function setUp() : void { diff --git a/benchmarks/AnomalyDetectors/RobustZScoreBench.php b/benchmarks/AnomalyDetectors/RobustZScoreBench.php index a4851c804..2e9a66d85 100644 --- a/benchmarks/AnomalyDetectors/RobustZScoreBench.php +++ b/benchmarks/AnomalyDetectors/RobustZScoreBench.php @@ -5,6 +5,7 @@ use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\AnomalyDetectors\RobustZScore; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; /** * @Groups({"AnomalyDetectors"}) @@ -12,24 +13,15 @@ */ class RobustZScoreBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var RobustZScore - */ - protected $estimator; + protected RobustZScore $estimator; public function setUp() : void { diff --git a/benchmarks/Classifiers/AdaBoostBench.php b/benchmarks/Classifiers/AdaBoostBench.php index faad0eda6..a443b593f 100644 --- a/benchmarks/Classifiers/AdaBoostBench.php +++ b/benchmarks/Classifiers/AdaBoostBench.php @@ -6,6 +6,7 @@ use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\Classifiers\ClassificationTree; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; /** * @Groups({"Classifiers"}) @@ -13,24 +14,15 @@ */ class AdaBoostBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var AdaBoost - */ - protected $estimator; + protected AdaBoost $estimator; public function setUp() : void { diff --git a/benchmarks/Classifiers/ClassificationTreeBench.php b/benchmarks/Classifiers/ClassificationTreeBench.php index 94e0e6e14..0ab3c2f64 100644 --- a/benchmarks/Classifiers/ClassificationTreeBench.php +++ b/benchmarks/Classifiers/ClassificationTreeBench.php @@ -5,6 +5,7 @@ use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\Classifiers\ClassificationTree; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; /** * @Groups({"Classifiers"}) @@ -12,24 +13,15 @@ */ class ClassificationTreeBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var ClassificationTree - */ - protected $estimator; + protected ClassificationTree $estimator; public function setUp() : void { diff --git a/benchmarks/Classifiers/ExtraTreeClassifierBench.php b/benchmarks/Classifiers/ExtraTreeClassifierBench.php index c24f51449..296198039 100644 --- a/benchmarks/Classifiers/ExtraTreeClassifierBench.php +++ b/benchmarks/Classifiers/ExtraTreeClassifierBench.php @@ -5,6 +5,7 @@ use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\Classifiers\ExtraTreeClassifier; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; /** * @Groups({"Classifiers"}) @@ -12,24 +13,15 @@ */ class ExtraTreeClassifierBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var ExtraTreeClassifier - */ - protected $estimator; + protected ExtraTreeClassifier $estimator; public function setUp() : void { diff --git a/benchmarks/Classifiers/GaussianNBBench.php b/benchmarks/Classifiers/GaussianNBBench.php index 0e93b05b3..ca1fd6970 100644 --- a/benchmarks/Classifiers/GaussianNBBench.php +++ b/benchmarks/Classifiers/GaussianNBBench.php @@ -5,6 +5,7 @@ use Rubix\ML\Classifiers\GaussianNB; use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; /** * @Groups({"Classifiers"}) @@ -12,24 +13,15 @@ */ class GaussianNBBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var GaussianNB - */ - protected $estimator; + protected GaussianNB $estimator; public function setUp() : void { diff --git a/benchmarks/Classifiers/KDNeighborsBench.php b/benchmarks/Classifiers/KDNeighborsBench.php index 351700830..b0d78144f 100644 --- a/benchmarks/Classifiers/KDNeighborsBench.php +++ b/benchmarks/Classifiers/KDNeighborsBench.php @@ -5,6 +5,7 @@ use Rubix\ML\Classifiers\KDNeighbors; use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; /** * @Groups({"Classifiers"}) @@ -12,24 +13,15 @@ */ class KDNeighborsBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var KDNeighbors - */ - protected $estimator; + protected KDNeighbors $estimator; public function setUp() : void { diff --git a/benchmarks/Classifiers/KNearestNeighborsBench.php b/benchmarks/Classifiers/KNearestNeighborsBench.php index 1d0c3f7cb..1af81fcc7 100644 --- a/benchmarks/Classifiers/KNearestNeighborsBench.php +++ b/benchmarks/Classifiers/KNearestNeighborsBench.php @@ -5,6 +5,7 @@ use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\Classifiers\KNearestNeighbors; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; /** * @Groups({"Classifiers"}) @@ -12,24 +13,15 @@ */ class KNearestNeighborsBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var KNearestNeighbors - */ - protected $estimator; + protected KNearestNeighbors $estimator; public function setUp() : void { diff --git a/benchmarks/Classifiers/LogisticRegressionBench.php b/benchmarks/Classifiers/LogisticRegressionBench.php index fd00b295b..e557327d6 100644 --- a/benchmarks/Classifiers/LogisticRegressionBench.php +++ b/benchmarks/Classifiers/LogisticRegressionBench.php @@ -5,6 +5,7 @@ use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\Classifiers\LogisticRegression; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; /** * @Groups({"Classifiers"}) @@ -12,24 +13,15 @@ */ class LogisticRegressionBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var LogisticRegression - */ - protected $estimator; + protected LogisticRegression $estimator; public function setUp() : void { diff --git a/benchmarks/Classifiers/LogitBoostBench.php b/benchmarks/Classifiers/LogitBoostBench.php index b1b2b0ee0..213e2f0e4 100644 --- a/benchmarks/Classifiers/LogitBoostBench.php +++ b/benchmarks/Classifiers/LogitBoostBench.php @@ -5,6 +5,7 @@ use Rubix\ML\Classifiers\LogitBoost; use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; /** * @Groups({"Classifiers"}) @@ -12,24 +13,15 @@ */ class LogitBoostBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var LogitBoost - */ - protected $estimator; + protected LogitBoost $estimator; public function setUp() : void { diff --git a/benchmarks/Classifiers/MultilayerPerceptronBench.php b/benchmarks/Classifiers/MultilayerPerceptronBench.php index fa6b23087..2ce15a04c 100644 --- a/benchmarks/Classifiers/MultilayerPerceptronBench.php +++ b/benchmarks/Classifiers/MultilayerPerceptronBench.php @@ -2,6 +2,7 @@ namespace Rubix\ML\Benchmarks\Classifiers; +use Rubix\ML\Datasets\Labeled; use Rubix\ML\NeuralNet\Layers\Dense; use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\NeuralNet\Layers\Activation; @@ -15,24 +16,15 @@ */ class MultilayerPerceptronBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var MultilayerPerceptron - */ - protected $estimator; + protected MultilayerPerceptron $estimator; public function setUp() : void { diff --git a/benchmarks/Classifiers/NaiveBayesBench.php b/benchmarks/Classifiers/NaiveBayesBench.php index 81f59183e..9033a0e4d 100644 --- a/benchmarks/Classifiers/NaiveBayesBench.php +++ b/benchmarks/Classifiers/NaiveBayesBench.php @@ -5,6 +5,7 @@ use Rubix\ML\Classifiers\NaiveBayes; use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; use Rubix\ML\Transformers\IntervalDiscretizer; /** @@ -13,24 +14,15 @@ */ class NaiveBayesBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var NaiveBayes - */ - protected $estimator; + protected NaiveBayes $estimator; public function setUp() : void { diff --git a/benchmarks/Classifiers/OneVsRestBench.php b/benchmarks/Classifiers/OneVsRestBench.php index b56b1d504..f26ba4cee 100644 --- a/benchmarks/Classifiers/OneVsRestBench.php +++ b/benchmarks/Classifiers/OneVsRestBench.php @@ -6,6 +6,7 @@ use Rubix\ML\Classifiers\OneVsRest; use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\Classifiers\LogisticRegression; +use Rubix\ML\Datasets\Labeled; use Rubix\ML\NeuralNet\Optimizers\Stochastic; use Rubix\ML\Datasets\Generators\Agglomerate; use Rubix\ML\Tests\DataProvider\BackendProviderTrait; @@ -18,24 +19,15 @@ class OneVsRestBench { use BackendProviderTrait; - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var OneVsRest - */ - protected $estimator; + protected OneVsRest $estimator; public function setUp() : void { diff --git a/benchmarks/Classifiers/RadiusNeighborsBench.php b/benchmarks/Classifiers/RadiusNeighborsBench.php index b7e1bce1a..53e46d4c7 100644 --- a/benchmarks/Classifiers/RadiusNeighborsBench.php +++ b/benchmarks/Classifiers/RadiusNeighborsBench.php @@ -5,6 +5,7 @@ use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\Classifiers\RadiusNeighbors; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; /** * @Groups({"Classifiers"}) @@ -12,24 +13,15 @@ */ class RadiusNeighborsBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var RadiusNeighbors - */ - protected $estimator; + protected RadiusNeighbors $estimator; public function setUp() : void { diff --git a/benchmarks/Classifiers/RandomForestBench.php b/benchmarks/Classifiers/RandomForestBench.php index 674090014..dbff5a904 100644 --- a/benchmarks/Classifiers/RandomForestBench.php +++ b/benchmarks/Classifiers/RandomForestBench.php @@ -7,6 +7,7 @@ use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\Classifiers\ClassificationTree; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; use Rubix\ML\Tests\DataProvider\BackendProviderTrait; use Rubix\ML\Transformers\IntervalDiscretizer; @@ -17,24 +18,15 @@ class RandomForestBench { use BackendProviderTrait; - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var RandomForest - */ - protected $estimator; + protected RandomForest $estimator; public function setUpContinuous() : void { diff --git a/benchmarks/Classifiers/SVCBench.php b/benchmarks/Classifiers/SVCBench.php index 5789ad476..aef3ec110 100644 --- a/benchmarks/Classifiers/SVCBench.php +++ b/benchmarks/Classifiers/SVCBench.php @@ -3,6 +3,7 @@ namespace Rubix\ML\Benchmarks\Classifiers; use Rubix\ML\Classifiers\SVC; +use Rubix\ML\Datasets\Labeled; use Rubix\ML\Kernels\SVM\Polynomial; use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\Datasets\Generators\Agglomerate; @@ -13,24 +14,15 @@ */ class SVCBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var SVC - */ - protected $estimator; + protected SVC $estimator; public function setUp() : void { diff --git a/benchmarks/Classifiers/SoftmaxClassifierBench.php b/benchmarks/Classifiers/SoftmaxClassifierBench.php index 64b598af1..bb888fe79 100644 --- a/benchmarks/Classifiers/SoftmaxClassifierBench.php +++ b/benchmarks/Classifiers/SoftmaxClassifierBench.php @@ -5,6 +5,7 @@ use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\Classifiers\SoftmaxClassifier; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; /** * @Groups({"Classifiers"}) @@ -12,24 +13,15 @@ */ class SoftmaxClassifierBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var SoftmaxClassifier - */ - protected $estimator; + protected SoftmaxClassifier $estimator; public function setUp() : void { diff --git a/benchmarks/Clusterers/DBSCANBench.php b/benchmarks/Clusterers/DBSCANBench.php index 41baee8dd..f231a3ece 100644 --- a/benchmarks/Clusterers/DBSCANBench.php +++ b/benchmarks/Clusterers/DBSCANBench.php @@ -15,7 +15,7 @@ class DBSCANBench protected const TESTING_SIZE = 10000; /** - * @var \Rubix\ML\Datasets\Labeled; + * @var \Rubix\ML\Datasets\Labeled */ protected $testing; diff --git a/benchmarks/Clusterers/FuzzyCMeansBench.php b/benchmarks/Clusterers/FuzzyCMeansBench.php index 3c629633e..b7b43ac82 100644 --- a/benchmarks/Clusterers/FuzzyCMeansBench.php +++ b/benchmarks/Clusterers/FuzzyCMeansBench.php @@ -17,12 +17,12 @@ class FuzzyCMeansBench protected const TESTING_SIZE = 10000; /** - * @var \Rubix\ML\Datasets\Labeled; + * @var \Rubix\ML\Datasets\Labeled */ protected $training; /** - * @var \Rubix\ML\Datasets\Labeled; + * @var \Rubix\ML\Datasets\Labeled */ protected $testing; diff --git a/benchmarks/Clusterers/GaussianMixtureBench.php b/benchmarks/Clusterers/GaussianMixtureBench.php index 0d2167837..d2fdf0c14 100644 --- a/benchmarks/Clusterers/GaussianMixtureBench.php +++ b/benchmarks/Clusterers/GaussianMixtureBench.php @@ -17,12 +17,12 @@ class GaussianMixtureBench protected const TESTING_SIZE = 10000; /** - * @var \Rubix\ML\Datasets\Labeled; + * @var \Rubix\ML\Datasets\Labeled */ protected $training; /** - * @var \Rubix\ML\Datasets\Labeled; + * @var \Rubix\ML\Datasets\Labeled */ protected $testing; diff --git a/benchmarks/Clusterers/KMeansBench.php b/benchmarks/Clusterers/KMeansBench.php index 598e0b0d9..1badd41b9 100644 --- a/benchmarks/Clusterers/KMeansBench.php +++ b/benchmarks/Clusterers/KMeansBench.php @@ -17,12 +17,12 @@ class KMeansBench protected const TESTING_SIZE = 10000; /** - * @var \Rubix\ML\Datasets\Labeled; + * @var \Rubix\ML\Datasets\Labeled */ protected $training; /** - * @var \Rubix\ML\Datasets\Labeled; + * @var \Rubix\ML\Datasets\Labeled */ protected $testing; diff --git a/benchmarks/Clusterers/MeanShiftBench.php b/benchmarks/Clusterers/MeanShiftBench.php index 0ae0d9afd..16db1fb12 100644 --- a/benchmarks/Clusterers/MeanShiftBench.php +++ b/benchmarks/Clusterers/MeanShiftBench.php @@ -5,6 +5,7 @@ use Rubix\ML\Clusterers\MeanShift; use Rubix\ML\Datasets\Generators\Blob; use Rubix\ML\Datasets\Generators\Agglomerate; +use Rubix\ML\Datasets\Labeled; /** * @Groups({"Clusterers"}) @@ -12,24 +13,15 @@ */ class MeanShiftBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var MeanShift - */ - protected $estimator; + protected MeanShift $estimator; public function setUp() : void { diff --git a/benchmarks/Datasets/RandomizationBench.php b/benchmarks/Datasets/RandomizationBench.php index 4b1f234c8..e93679576 100644 --- a/benchmarks/Datasets/RandomizationBench.php +++ b/benchmarks/Datasets/RandomizationBench.php @@ -17,7 +17,7 @@ class RandomizationBench protected const SUBSAMPLE_SIZE = 10000; /** - * @var \Rubix\ML\Datasets\Labeled; + * @var \Rubix\ML\Datasets\Labeled */ protected $dataset; diff --git a/benchmarks/Datasets/SortingBench.php b/benchmarks/Datasets/SortingBench.php index 4ca135901..c049257e6 100644 --- a/benchmarks/Datasets/SortingBench.php +++ b/benchmarks/Datasets/SortingBench.php @@ -14,7 +14,7 @@ class SortingBench protected const DATASET_SIZE = 2500; /** - * @var \Rubix\ML\Datasets\Labeled; + * @var \Rubix\ML\Datasets\Labeled */ protected $dataset; diff --git a/benchmarks/Datasets/SplittingBench.php b/benchmarks/Datasets/SplittingBench.php index 214c14980..a4751651f 100644 --- a/benchmarks/Datasets/SplittingBench.php +++ b/benchmarks/Datasets/SplittingBench.php @@ -14,7 +14,7 @@ class SplittingBench protected const DATASET_SIZE = 25000; /** - * @var \Rubix\ML\Datasets\Labeled; + * @var \Rubix\ML\Datasets\Labeled */ protected $dataset; diff --git a/benchmarks/Graph/Trees/BallTreeBench.php b/benchmarks/Graph/Trees/BallTreeBench.php index c4066c4a5..b673e99a7 100644 --- a/benchmarks/Graph/Trees/BallTreeBench.php +++ b/benchmarks/Graph/Trees/BallTreeBench.php @@ -15,7 +15,7 @@ class BallTreeBench protected const DATASET_SIZE = 10000; /** - * @var \Rubix\ML\Datasets\Labeled; + * @var \Rubix\ML\Datasets\Labeled */ protected $dataset; diff --git a/benchmarks/Graph/Trees/KDTreeBench.php b/benchmarks/Graph/Trees/KDTreeBench.php index ad4f479d2..c7164e75f 100644 --- a/benchmarks/Graph/Trees/KDTreeBench.php +++ b/benchmarks/Graph/Trees/KDTreeBench.php @@ -15,7 +15,7 @@ class KDTreeBench protected const DATASET_SIZE = 10000; /** - * @var \Rubix\ML\Datasets\Labeled; + * @var \Rubix\ML\Datasets\Labeled */ protected $dataset; diff --git a/benchmarks/Graph/Trees/VantageTreeBench.php b/benchmarks/Graph/Trees/VantageTreeBench.php index b2e878256..0d7b19a97 100644 --- a/benchmarks/Graph/Trees/VantageTreeBench.php +++ b/benchmarks/Graph/Trees/VantageTreeBench.php @@ -15,7 +15,7 @@ class VantageTreeBench protected const DATASET_SIZE = 10000; /** - * @var \Rubix\ML\Datasets\Labeled; + * @var \Rubix\ML\Datasets\Labeled */ protected $dataset; diff --git a/benchmarks/Regressors/AdalineBench.php b/benchmarks/Regressors/AdalineBench.php index e9e026182..71e4a125f 100644 --- a/benchmarks/Regressors/AdalineBench.php +++ b/benchmarks/Regressors/AdalineBench.php @@ -2,6 +2,7 @@ namespace Rubix\ML\Benchmarks\Regressors; +use Rubix\ML\Datasets\Labeled; use Rubix\ML\Regressors\Adaline; use Rubix\ML\Datasets\Generators\Hyperplane; @@ -11,24 +12,15 @@ */ class AdalineBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var Adaline - */ - protected $estimator; + protected Adaline $estimator; public function setUp() : void { diff --git a/benchmarks/Regressors/ExtraTreeRegressorBench.php b/benchmarks/Regressors/ExtraTreeRegressorBench.php index ae7f04680..51e5e71e1 100644 --- a/benchmarks/Regressors/ExtraTreeRegressorBench.php +++ b/benchmarks/Regressors/ExtraTreeRegressorBench.php @@ -2,6 +2,7 @@ namespace Rubix\ML\Benchmarks\Regressors; +use Rubix\ML\Datasets\Labeled; use Rubix\ML\Regressors\ExtraTreeRegressor; use Rubix\ML\Datasets\Generators\Hyperplane; @@ -11,24 +12,15 @@ */ class ExtraTreeRegressorBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var ExtraTreeRegressor - */ - protected $estimator; + protected ExtraTreeRegressor $estimator; public function setUp() : void { diff --git a/benchmarks/Regressors/GradientBoostBench.php b/benchmarks/Regressors/GradientBoostBench.php index 0321a697b..0c374ab8c 100644 --- a/benchmarks/Regressors/GradientBoostBench.php +++ b/benchmarks/Regressors/GradientBoostBench.php @@ -2,6 +2,7 @@ namespace Rubix\ML\Benchmarks\Regressors; +use Rubix\ML\Datasets\Labeled; use Rubix\ML\Regressors\GradientBoost; use Rubix\ML\Datasets\Generators\Hyperplane; use Rubix\ML\Transformers\IntervalDiscretizer; @@ -11,24 +12,15 @@ */ class GradientBoostBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var GradientBoost - */ - protected $estimator; + protected GradientBoost $estimator; public function setUpContinuous() : void { diff --git a/benchmarks/Regressors/KDNeighborsRegressorBench.php b/benchmarks/Regressors/KDNeighborsRegressorBench.php index d9f26890d..07b18f94e 100644 --- a/benchmarks/Regressors/KDNeighborsRegressorBench.php +++ b/benchmarks/Regressors/KDNeighborsRegressorBench.php @@ -2,6 +2,7 @@ namespace Rubix\ML\Benchmarks\Regressors; +use Rubix\ML\Datasets\Labeled; use Rubix\ML\Regressors\KDNeighborsRegressor; use Rubix\ML\Datasets\Generators\Hyperplane; @@ -11,24 +12,15 @@ */ class KDNeighborsRegressorBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var KDNeighborsRegressor - */ - protected $estimator; + protected KDNeighborsRegressor $estimator; public function setUp() : void { diff --git a/benchmarks/Regressors/KNNRegressorBench.php b/benchmarks/Regressors/KNNRegressorBench.php index 993de0d00..5c5b1d38a 100644 --- a/benchmarks/Regressors/KNNRegressorBench.php +++ b/benchmarks/Regressors/KNNRegressorBench.php @@ -2,6 +2,7 @@ namespace Rubix\ML\Benchmarks\Regressors; +use Rubix\ML\Datasets\Labeled; use Rubix\ML\Regressors\KNNRegressor; use Rubix\ML\Datasets\Generators\Hyperplane; @@ -11,24 +12,15 @@ */ class KNNRegressorBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var KNNRegressor - */ - protected $estimator; + protected KNNRegressor $estimator; public function setUp() : void { diff --git a/benchmarks/Regressors/MLPRegressorBench.php b/benchmarks/Regressors/MLPRegressorBench.php index 8aaa0c6ab..552f2f805 100644 --- a/benchmarks/Regressors/MLPRegressorBench.php +++ b/benchmarks/Regressors/MLPRegressorBench.php @@ -2,6 +2,7 @@ namespace Rubix\ML\Benchmarks\Regressors; +use Rubix\ML\Datasets\Labeled; use Rubix\ML\NeuralNet\Layers\Dense; use Rubix\ML\Regressors\MLPRegressor; use Rubix\ML\NeuralNet\Layers\Activation; @@ -14,24 +15,15 @@ */ class MLPRegressorBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var MLPRegressor - */ - protected $estimator; + protected MLPRegressor $estimator; public function setUp() : void { diff --git a/benchmarks/Regressors/RadiusNeighborsRegressorBench.php b/benchmarks/Regressors/RadiusNeighborsRegressorBench.php index 9813dfbaf..4b6f4d5aa 100644 --- a/benchmarks/Regressors/RadiusNeighborsRegressorBench.php +++ b/benchmarks/Regressors/RadiusNeighborsRegressorBench.php @@ -2,6 +2,7 @@ namespace Rubix\ML\Benchmarks\Regressors; +use Rubix\ML\Datasets\Labeled; use Rubix\ML\Regressors\RadiusNeighborsRegressor; use Rubix\ML\Datasets\Generators\Hyperplane; @@ -11,24 +12,15 @@ */ class RadiusNeighborsRegressorBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var RadiusNeighborsRegressor - */ - protected $estimator; + protected RadiusNeighborsRegressor $estimator; public function setUp() : void { diff --git a/benchmarks/Regressors/RegressionTreeBench.php b/benchmarks/Regressors/RegressionTreeBench.php index fab6d1abf..31dc6dfb2 100644 --- a/benchmarks/Regressors/RegressionTreeBench.php +++ b/benchmarks/Regressors/RegressionTreeBench.php @@ -2,6 +2,7 @@ namespace Rubix\ML\Benchmarks\Regressors; +use Rubix\ML\Datasets\Labeled; use Rubix\ML\Regressors\RegressionTree; use Rubix\ML\Datasets\Generators\Hyperplane; @@ -11,24 +12,15 @@ */ class RegressionTreeBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var RegressionTree - */ - protected $estimator; + protected RegressionTree $estimator; public function setUp() : void { diff --git a/benchmarks/Regressors/RidgeBench.php b/benchmarks/Regressors/RidgeBench.php index d6f6f61f5..fb0e0653a 100644 --- a/benchmarks/Regressors/RidgeBench.php +++ b/benchmarks/Regressors/RidgeBench.php @@ -2,6 +2,7 @@ namespace Rubix\ML\Benchmarks\Regressors; +use Rubix\ML\Datasets\Labeled; use Rubix\ML\Regressors\Ridge; use Rubix\ML\Datasets\Generators\Hyperplane; @@ -11,24 +12,15 @@ */ class RidgeBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var Ridge - */ - protected $estimator; + protected Ridge $estimator; public function setUp() : void { diff --git a/benchmarks/Regressors/SVRBench.php b/benchmarks/Regressors/SVRBench.php index 64fd4f333..3e2fb40bd 100644 --- a/benchmarks/Regressors/SVRBench.php +++ b/benchmarks/Regressors/SVRBench.php @@ -2,6 +2,7 @@ namespace Rubix\ML\Benchmarks\Regressors; +use Rubix\ML\Datasets\Labeled; use Rubix\ML\Regressors\SVR; use Rubix\ML\Datasets\Generators\Hyperplane; @@ -11,24 +12,15 @@ */ class SVRBench { - protected const TRAINING_SIZE = 10000; + protected const int TRAINING_SIZE = 10000; - protected const TESTING_SIZE = 10000; + protected const int TESTING_SIZE = 10000; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $training; + protected Labeled $training; - /** - * @var \Rubix\ML\Datasets\Labeled; - */ - protected $testing; + protected Labeled $testing; - /** - * @var SVR - */ - protected $estimator; + protected SVR $estimator; public function setUp() : void { diff --git a/benchmarks/Tokenizers/KSkipNGramBench.php b/benchmarks/Tokenizers/KSkipNGramBench.php index 88dd3485f..322314f4a 100644 --- a/benchmarks/Tokenizers/KSkipNGramBench.php +++ b/benchmarks/Tokenizers/KSkipNGramBench.php @@ -10,12 +10,9 @@ */ class KSkipNGramBench { - protected const SAMPLE_TEXT = "Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb."; + protected const string SAMPLE_TEXT = "Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb."; - /** - * @var \Rubix\ML\Tokenizers\KSkipNGram; - */ - protected $tokenizer; + protected KSkipNGram $tokenizer; public function setUp() : void { diff --git a/benchmarks/Tokenizers/NGramBench.php b/benchmarks/Tokenizers/NGramBench.php index fc9da151d..759daea66 100644 --- a/benchmarks/Tokenizers/NGramBench.php +++ b/benchmarks/Tokenizers/NGramBench.php @@ -10,12 +10,9 @@ */ class NGramBench { - protected const SAMPLE_TEXT = "Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb."; + protected const string SAMPLE_TEXT = "Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb."; - /** - * @var \Rubix\ML\Tokenizers\NGram; - */ - protected $tokenizer; + protected NGram $tokenizer; public function setUp() : void { diff --git a/benchmarks/Tokenizers/SentenceBench.php b/benchmarks/Tokenizers/SentenceBench.php index c7da03d0d..f4021967b 100644 --- a/benchmarks/Tokenizers/SentenceBench.php +++ b/benchmarks/Tokenizers/SentenceBench.php @@ -10,12 +10,9 @@ */ class SentenceBench { - protected const SAMPLE_TEXT = "Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb."; + protected const string SAMPLE_TEXT = "Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb."; - /** - * @var \Rubix\ML\Tokenizers\Sentence; - */ - protected $tokenizer; + protected Sentence $tokenizer; public function setUp() : void { diff --git a/benchmarks/Tokenizers/WhitespaceBench.php b/benchmarks/Tokenizers/WhitespaceBench.php index a9dd9f11a..b04432358 100644 --- a/benchmarks/Tokenizers/WhitespaceBench.php +++ b/benchmarks/Tokenizers/WhitespaceBench.php @@ -10,12 +10,9 @@ */ class WhitespaceBench { - protected const SAMPLE_TEXT = "Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb."; + protected const string SAMPLE_TEXT = "Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb."; - /** - * @var \Rubix\ML\Tokenizers\Whitespace; - */ - protected $tokenizer; + protected Whitespace $tokenizer; public function setUp() : void { diff --git a/benchmarks/Tokenizers/WordBench.php b/benchmarks/Tokenizers/WordBench.php index 3538b3e4c..448001d14 100644 --- a/benchmarks/Tokenizers/WordBench.php +++ b/benchmarks/Tokenizers/WordBench.php @@ -10,12 +10,9 @@ */ class WordBench { - protected const SAMPLE_TEXT = "Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb."; + protected const string SAMPLE_TEXT = "Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb."; - /** - * @var \Rubix\ML\Tokenizers\Word; - */ - protected $tokenizer; + protected Word $tokenizer; public function setUp() : void { diff --git a/benchmarks/Tokenizers/WordStemmerBench.php b/benchmarks/Tokenizers/WordStemmerBench.php index 9c459790e..c6c16aa85 100644 --- a/benchmarks/Tokenizers/WordStemmerBench.php +++ b/benchmarks/Tokenizers/WordStemmerBench.php @@ -2,6 +2,7 @@ namespace Rubix\ML\Benchmarks\Tokenizers; +use Rubix\ML\Tokenizers\Word; use Rubix\ML\Tokenizers\WordStemmer; /** @@ -10,12 +11,9 @@ */ class WordStemmerBench { - protected const SAMPLE_TEXT = "Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb."; + protected const string SAMPLE_TEXT = "Do you see any Teletubbies in here? Do you see a slender plastic tag clipped to my shirt with my name printed on it? Do you see a little Asian child with a blank expression on his face sitting outside on a mechanical helicopter that shakes when you put quarters in it? No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb."; - /** - * @var \Rubix\ML\Tokenizers\Word; - */ - protected $tokenizer; + protected Word $tokenizer; public function setUp() : void { diff --git a/benchmarks/Transformers/TSNEBench.php b/benchmarks/Transformers/TSNEBench.php index d17ce1226..1eea75663 100644 --- a/benchmarks/Transformers/TSNEBench.php +++ b/benchmarks/Transformers/TSNEBench.php @@ -15,7 +15,7 @@ class TSNEBench protected const TESTING_SIZE = 1000; /** - * @var \Rubix\ML\Datasets\Labeled; + * @var \Rubix\ML\Datasets\Labeled */ protected $testing; diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 000000000..78c918400 --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,1627 @@ +parameters: + ignoreErrors: + - + message: '#^Method Rubix\\ML\\BootstrapAggregator\:\:params\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/BootstrapAggregator.php + + - + message: '#^Method Rubix\\ML\\BootstrapAggregator\:\:predict\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/BootstrapAggregator.php + + - + message: '#^Method Rubix\\ML\\Classifiers\\AdaBoost\:\:losses\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Classifiers/AdaBoost.php + + - + message: '#^Method Rubix\\ML\\Classifiers\\AdaBoost\:\:predict\(\) should return list\ but returns list\\.$#' + identifier: return.type + count: 1 + path: src/Classifiers/AdaBoost.php + + - + message: '#^Method Rubix\\ML\\Classifiers\\AdaBoost\:\:score\(\) should return list\\> but returns array\, array\\>\.$#' + identifier: return.type + count: 1 + path: src/Classifiers/AdaBoost.php + + - + message: '#^Method Rubix\\ML\\Classifiers\\AdaBoost\:\:steps\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Classifiers/AdaBoost.php + + - + message: '#^PHPDoc tag @return contains unresolvable type\.$#' + identifier: return.unresolvableType + count: 1 + path: src/Classifiers/AdaBoost.php + + - + message: '#^PHPDoc tag @var for property Rubix\\ML\\Classifiers\\AdaBoost\:\:\$losses contains unresolvable type\.$#' + identifier: property.unresolvableType + count: 1 + path: src/Classifiers/AdaBoost.php + + - + message: '#^PHPDoc tag @var for property Rubix\\ML\\Classifiers\\AdaBoost\:\:\$losses with type mixed is not subtype of native type array\|null\.$#' + identifier: property.phpDocType + count: 1 + path: src/Classifiers/AdaBoost.php + + - + message: '#^Property Rubix\\ML\\Classifiers\\AdaBoost\:\:\$losses type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Classifiers/AdaBoost.php + + - + message: '#^Property Rubix\\ML\\Classifiers\\ClassificationTree\:\:\$classes \(list\\) does not accept array\\.$#' + identifier: assign.propertyType + count: 1 + path: src/Classifiers/ClassificationTree.php + + - + message: '#^Parameter \#1 \$sample of method Rubix\\ML\\Classifiers\\GaussianNB\:\:jointLogLikelihood\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 2 + path: src/Classifiers/GaussianNB.php + + - + message: '#^Method Rubix\\ML\\Classifiers\\KNearestNeighbors\:\:nearest\(\) should return array\{list\, list\\} but returns array\{array\, string\>, array\, float\>\}\.$#' + identifier: return.type + count: 1 + path: src/Classifiers/KNearestNeighbors.php + + - + message: '#^Parameter \#2 \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\Metric\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Classifiers/LogitBoost.php + + - + message: '#^Instanceof between Rubix\\ML\\NeuralNet\\Layers\\Hidden and Rubix\\ML\\NeuralNet\\Layers\\Hidden will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue + count: 1 + path: src/Classifiers/MultilayerPerceptron.php + + - + message: '#^Parameter \#2 \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\Metric\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Classifiers/MultilayerPerceptron.php + + - + message: '#^Method Rubix\\ML\\Classifiers\\NaiveBayes\:\:counts\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Classifiers/NaiveBayes.php + + - + message: '#^PHPDoc tag @return has invalid value \(array\\>\>\>\>\|null\)\: Unexpected token "\>", expected TOKEN_HORIZONTAL_WS at offset 121 on line 4$#' + identifier: phpDoc.parseError + count: 1 + path: src/Classifiers/NaiveBayes.php + + - + message: '#^Property Rubix\\ML\\Classifiers\\NaiveBayes\:\:\$counts \(array\\>\>\>\) does not accept non\-empty\-array\\>\>\>\.$#' + identifier: assign.propertyType + count: 1 + path: src/Classifiers/NaiveBayes.php + + - + message: '#^Property Rubix\\ML\\Classifiers\\NaiveBayes\:\:\$probs \(array\\>\>\) does not accept non\-empty\-array\\>\>\.$#' + identifier: assign.propertyType + count: 1 + path: src/Classifiers/NaiveBayes.php + + - + message: '#^Method Rubix\\ML\\Classifiers\\RandomForest\:\:proba\(\) should return list\\> but returns array\\>\.$#' + identifier: return.type + count: 1 + path: src/Classifiers/RandomForest.php + + - + message: '#^PHPDoc tag @var with type array\ is not subtype of native type array\\>\.$#' + identifier: varTag.nativeType + count: 1 + path: src/Classifiers/RandomForest.php + + - + message: '#^Parameter \#1 \.\.\.\$arg1 of function min expects non\-empty\-array, array\\> given\.$#' + identifier: argument.type + count: 1 + path: src/Classifiers/RandomForest.php + + - + message: '#^Property Rubix\\ML\\Classifiers\\RandomForest\:\:\$trees \(list\\|null\) does not accept array\\.$#' + identifier: assign.propertyType + count: 1 + path: src/Classifiers/RandomForest.php + + - + message: '#^Method Rubix\\ML\\Clusterers\\DBSCAN\:\:predict\(\) should return list\ but returns array\\>\.$#' + identifier: return.type + count: 1 + path: src/Clusterers/DBSCAN.php + + - + message: '#^Parameter \#1 \$sample of method Rubix\\ML\\Clusterers\\FuzzyCMeans\:\:probaSample\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Clusterers/FuzzyCMeans.php + + - + message: '#^Parameter \#2 \$memberships of method Rubix\\ML\\Clusterers\\FuzzyCMeans\:\:inertia\(\) expects list\\>, list\\> given\.$#' + identifier: argument.type + count: 1 + path: src/Clusterers/FuzzyCMeans.php + + - + message: '#^Parameter \#1 \$sample of method Rubix\\ML\\Clusterers\\GaussianMixture\:\:jointLogLikelihood\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Clusterers/GaussianMixture.php + + - + message: '#^Property Rubix\\ML\\Clusterers\\GaussianMixture\:\:\$means \(list\\>\) does not accept non\-empty\-array\, list\\>\.$#' + identifier: assign.propertyType + count: 1 + path: src/Clusterers/GaussianMixture.php + + - + message: '#^Property Rubix\\ML\\Clusterers\\GaussianMixture\:\:\$means \(list\\>\) does not accept non\-empty\-array\, list\\>\.$#' + identifier: assign.propertyType + count: 1 + path: src/Clusterers/GaussianMixture.php + + - + message: '#^Property Rubix\\ML\\Clusterers\\GaussianMixture\:\:\$variances \(list\\>\) does not accept non\-empty\-array\, list\\>\.$#' + identifier: assign.propertyType + count: 1 + path: src/Clusterers/GaussianMixture.php + + - + message: '#^Property Rubix\\ML\\Clusterers\\GaussianMixture\:\:\$variances \(list\\>\) does not accept non\-empty\-array\, list\\>\.$#' + identifier: assign.propertyType + count: 1 + path: src/Clusterers/GaussianMixture.php + + - + message: '#^Parameter \#2 \$labels of method Rubix\\ML\\Clusterers\\KMeans\:\:inertia\(\) expects list\, array given\.$#' + identifier: argument.type + count: 1 + path: src/Clusterers/KMeans.php + + - + message: '#^Parameter \#1 \$current of method Rubix\\ML\\Clusterers\\MeanShift\:\:shift\(\) expects list\\>, array\, list\\> given\.$#' + identifier: argument.type + count: 1 + path: src/Clusterers/MeanShift.php + + - + message: '#^Parameter \#2 \$b of method Rubix\\ML\\Kernels\\Distance\\Distance\:\:compute\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 2 + path: src/Clusterers/MeanShift.php + + - + message: '#^Parameter \#2 \$previous of method Rubix\\ML\\Clusterers\\MeanShift\:\:shift\(\) expects list\\>, array\, list\\> given\.$#' + identifier: argument.type + count: 1 + path: src/Clusterers/MeanShift.php + + - + message: '#^Property Rubix\\ML\\Clusterers\\Seeders\\Preset\:\:\$centroids \(list\\>\) does not accept non\-empty\-list\\>\.$#' + identifier: assign.propertyType + count: 1 + path: src/Clusterers/Seeders/Preset.php + + - + message: '#^Instanceof between Rubix\\ML\\Learner and Rubix\\ML\\Learner will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue + count: 1 + path: src/CommitteeMachine.php + + - + message: '#^Property Rubix\\ML\\CommitteeMachine\:\:\$experts \(list\\) does not accept array\\.$#' + identifier: assign.propertyType + count: 1 + path: src/CommitteeMachine.php + + - + message: '#^Parameter \#2 \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\Metric\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/CrossValidation/HoldOut.php + + - + message: '#^PHPDoc tag @return has invalid value \(\\Rubix\\ML\\Tuple\{float,float\}\)\: Unexpected token "\{", expected TOKEN_HORIZONTAL_WS at offset 112 on line 4$#' + identifier: phpDoc.parseError + count: 1 + path: src/CrossValidation/Metrics/Accuracy.php + + - + message: '#^PHPDoc tag @return has invalid value \(\\Rubix\\ML\\Tuple\{float,float\}\)\: Unexpected token "\{", expected TOKEN_HORIZONTAL_WS at offset 112 on line 4$#' + identifier: phpDoc.parseError + count: 1 + path: src/CrossValidation/Metrics/Completeness.php + + - + message: '#^PHPDoc tag @return has invalid value \(\\Rubix\\ML\\Tuple\{float,float\}\)\: Unexpected token "\{", expected TOKEN_HORIZONTAL_WS at offset 112 on line 4$#' + identifier: phpDoc.parseError + count: 1 + path: src/CrossValidation/Metrics/FBeta.php + + - + message: '#^PHPDoc tag @return has invalid value \(\\Rubix\\ML\\Tuple\{float,float\}\)\: Unexpected token "\{", expected TOKEN_HORIZONTAL_WS at offset 112 on line 4$#' + identifier: phpDoc.parseError + count: 1 + path: src/CrossValidation/Metrics/Homogeneity.php + + - + message: '#^PHPDoc tag @return has invalid value \(\\Rubix\\ML\\Tuple\{float,float\}\)\: Unexpected token "\{", expected TOKEN_HORIZONTAL_WS at offset 112 on line 4$#' + identifier: phpDoc.parseError + count: 1 + path: src/CrossValidation/Metrics/Informedness.php + + - + message: '#^PHPDoc tag @return has invalid value \(\\Rubix\\ML\\Tuple\{float,float\}\)\: Unexpected token "\{", expected TOKEN_HORIZONTAL_WS at offset 112 on line 4$#' + identifier: phpDoc.parseError + count: 1 + path: src/CrossValidation/Metrics/MCC.php + + - + message: '#^PHPDoc tag @return has invalid value \(\\Rubix\\ML\\Tuple\{float,float\}\)\: Unexpected token "\{", expected TOKEN_HORIZONTAL_WS at offset 112 on line 4$#' + identifier: phpDoc.parseError + count: 1 + path: src/CrossValidation/Metrics/MeanAbsoluteError.php + + - + message: '#^PHPDoc tag @return has invalid value \(\\Rubix\\ML\\Tuple\{float,float\}\)\: Unexpected token "\{", expected TOKEN_HORIZONTAL_WS at offset 112 on line 4$#' + identifier: phpDoc.parseError + count: 1 + path: src/CrossValidation/Metrics/MeanSquaredError.php + + - + message: '#^PHPDoc tag @return has invalid value \(\\Rubix\\ML\\Tuple\{float,float\}\)\: Unexpected token "\{", expected TOKEN_HORIZONTAL_WS at offset 112 on line 4$#' + identifier: phpDoc.parseError + count: 1 + path: src/CrossValidation/Metrics/MedianAbsoluteError.php + + - + message: '#^PHPDoc tag @return has invalid value \(\\Rubix\\ML\\Tuple\{float,float\}\)\: Unexpected token "\{", expected TOKEN_HORIZONTAL_WS at offset 105 on line 4$#' + identifier: phpDoc.parseError + count: 1 + path: src/CrossValidation/Metrics/Metric.php + + - + message: '#^PHPDoc tag @return has invalid value \(\\Rubix\\ML\\Tuple\{float,float\}\)\: Unexpected token "\{", expected TOKEN_HORIZONTAL_WS at offset 105 on line 4$#' + identifier: phpDoc.parseError + count: 1 + path: src/CrossValidation/Metrics/ProbabilisticMetric.php + + - + message: '#^Parameter \#1 \$predictions of method Rubix\\ML\\CrossValidation\\Metrics\\MeanSquaredError\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/CrossValidation/Metrics/RMSE.php + + - + message: '#^Parameter \#2 \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\MeanSquaredError\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/CrossValidation/Metrics/RMSE.php + + - + message: '#^PHPDoc tag @return has invalid value \(\\Rubix\\ML\\Tuple\{float,float\}\)\: Unexpected token "\{", expected TOKEN_HORIZONTAL_WS at offset 112 on line 4$#' + identifier: phpDoc.parseError + count: 1 + path: src/CrossValidation/Metrics/RSquared.php + + - + message: '#^PHPDoc tag @return has invalid value \(\\Rubix\\ML\\Tuple\{float,float\}\)\: Unexpected token "\{", expected TOKEN_HORIZONTAL_WS at offset 112 on line 4$#' + identifier: phpDoc.parseError + count: 1 + path: src/CrossValidation/Metrics/RandIndex.php + + - + message: '#^PHPDoc tag @return has invalid value \(\\Rubix\\ML\\Tuple\{float,float\}\)\: Unexpected token "\{", expected TOKEN_HORIZONTAL_WS at offset 112 on line 4$#' + identifier: phpDoc.parseError + count: 1 + path: src/CrossValidation/Metrics/SMAPE.php + + - + message: '#^PHPDoc tag @return has invalid value \(\\Rubix\\ML\\Tuple\{float,float\}\)\: Unexpected token "\{", expected TOKEN_HORIZONTAL_WS at offset 112 on line 4$#' + identifier: phpDoc.parseError + count: 1 + path: src/CrossValidation/Metrics/VMeasure.php + + - + message: '#^Instanceof between Rubix\\ML\\CrossValidation\\Reports\\ReportGenerator and Rubix\\ML\\CrossValidation\\Reports\\ReportGenerator will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue + count: 1 + path: src/CrossValidation/Reports/AggregateReport.php + + - + message: '#^Method Rubix\\ML\\CrossValidation\\Reports\\AggregateReport\:\:compatibility\(\) should return list\ but returns array\\.$#' + identifier: return.type + count: 1 + path: src/CrossValidation/Reports/AggregateReport.php + + - + message: '#^Method Rubix\\ML\\Datasets\\Dataset\:\:types\(\) should return list\ but returns array\\.$#' + identifier: return.type + count: 1 + path: src/Datasets/Dataset.php + + - + message: '#^Method Rubix\\ML\\Datasets\\Dataset\:\:uniqueTypes\(\) should return list\ but returns array\, Rubix\\ML\\DataType\>\.$#' + identifier: return.type + count: 1 + path: src/Datasets/Dataset.php + + - + message: '#^Offset 0 on non\-empty\-list\\> on left side of \?\? always exists and is not nullable\.$#' + identifier: nullCoalesce.offset + count: 1 + path: src/Datasets/Dataset.php + + - + message: '#^Property Rubix\\ML\\Datasets\\Dataset\:\:\$samples \(list\\>\) does not accept array\\.$#' + identifier: assign.propertyType + count: 1 + path: src/Datasets/Dataset.php + + - + message: '#^Instanceof between Rubix\\ML\\Datasets\\Generators\\Generator and Rubix\\ML\\Datasets\\Generators\\Generator will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue + count: 1 + path: src/Datasets/Generators/Agglomerate.php + + - + message: '#^Ternary operator condition is always true\.$#' + identifier: ternary.alwaysTrue + count: 1 + path: src/Datasets/Generators/Agglomerate.php + + - + message: '#^Instanceof between Rubix\\ML\\Datasets\\Labeled and Rubix\\ML\\Datasets\\Labeled will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue + count: 1 + path: src/Datasets/Labeled.php + + - + message: '#^PHPDoc tag @var with type array\ is not subtype of native type array\\.$#' + identifier: varTag.nativeType + count: 1 + path: src/Datasets/Labeled.php + + - + message: '#^PHPDoc tag @var with type list\ is not subtype of native type array\\.$#' + identifier: varTag.nativeType + count: 1 + path: src/Datasets/Labeled.php + + - + message: '#^Parameter \#2 \$b of method Rubix\\ML\\Kernels\\Distance\\Distance\:\:compute\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 2 + path: src/Datasets/Labeled.php + + - + message: '#^Property Rubix\\ML\\Datasets\\Labeled\:\:\$labels \(list\\) does not accept array\\.$#' + identifier: assign.propertyType + count: 1 + path: src/Datasets/Labeled.php + + - + message: '#^Instanceof between Rubix\\ML\\Datasets\\Dataset and Rubix\\ML\\Datasets\\Dataset will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue + count: 1 + path: src/Datasets/Unlabeled.php + + - + message: '#^Parameter \#2 \$b of method Rubix\\ML\\Kernels\\Distance\\Distance\:\:compute\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 2 + path: src/Datasets/Unlabeled.php + + - + message: '#^Call to function is_array\(\) with non\-empty\-array\ will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: src/Extractors/CSV.php + + - + message: '#^Parameter \#1 \$keys of function array_combine expects array\, list\ given\.$#' + identifier: argument.type + count: 1 + path: src/Extractors/CSV.php + + - + message: '#^Parameter \#1 \.\.\.\$arg1 of function max expects non\-empty\-array, list\ given\.$#' + identifier: argument.type + count: 1 + path: src/Graph/Nodes/Ball.php + + - + message: '#^Method Rubix\\ML\\Graph\\Nodes\\Best\:\:__construct\(\) has Rubix\\ML\\Exceptions\\InvalidArgumentException in PHPDoc @throws tag but it''s not thrown\.$#' + identifier: throws.unusedType + count: 1 + path: src/Graph/Nodes/Best.php + + - + message: '#^Parameter \#1 \.\.\.\$arg1 of function max expects non\-empty\-array, list\ given\.$#' + identifier: argument.type + count: 1 + path: src/Graph/Nodes/Clique.php + + - + message: '#^Method Rubix\\ML\\Graph\\Nodes\\Depth\:\:__construct\(\) has Rubix\\ML\\Exceptions\\InvalidArgumentException in PHPDoc @throws tag but it''s not thrown\.$#' + identifier: throws.unusedType + count: 1 + path: src/Graph/Nodes/Depth.php + + - + message: '#^Method Rubix\\ML\\Graph\\Nodes\\Isolator\:\:__construct\(\) has Rubix\\ML\\Exceptions\\InvalidArgumentException in PHPDoc @throws tag but it''s not thrown\.$#' + identifier: throws.unusedType + count: 1 + path: src/Graph/Nodes/Isolator.php + + - + message: '#^Parameter \#1 \.\.\.\$arg1 of function max expects non\-empty\-array, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Graph/Nodes/Isolator.php + + - + message: '#^Parameter \#1 \.\.\.\$arg1 of function min expects non\-empty\-array, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Graph/Nodes/Isolator.php + + - + message: '#^Method Rubix\\ML\\Graph\\Nodes\\Split\:\:__construct\(\) has Rubix\\ML\\Exceptions\\InvalidArgumentException in PHPDoc @throws tag but it''s not thrown\.$#' + identifier: throws.unusedType + count: 1 + path: src/Graph/Nodes/Split.php + + - + message: '#^Parameter \#1 \.\.\.\$arg1 of function max expects non\-empty\-array, list\ given\.$#' + identifier: argument.type + count: 1 + path: src/Graph/Nodes/VantagePoint.php + + - + message: '#^Method Rubix\\ML\\Graph\\Trees\\BallTree\:\:nearest\(\) should return array\{list\\>, list\, list\\} but returns array\{list\\>, array\, list\\}\.$#' + identifier: return.type + count: 1 + path: src/Graph/Trees/BallTree.php + + - + message: '#^Parameter \#1 \$labels of method Rubix\\ML\\Graph\\Trees\\DecisionTree\:\:impurity\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Graph/Trees/DecisionTree.php + + - + message: '#^Parameter \#1 \.\.\.\$arg1 of function max expects non\-empty\-array, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Graph/Trees/ExtraTree.php + + - + message: '#^Parameter \#1 \.\.\.\$arg1 of function min expects non\-empty\-array, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Graph/Trees/ExtraTree.php + + - + message: '#^Method Rubix\\ML\\Graph\\Trees\\KDTree\:\:nearest\(\) should return array\{list\\>, list\, list\\} but returns array\{list\\>, array\, list\\}\.$#' + identifier: return.type + count: 1 + path: src/Graph/Trees/KDTree.php + + - + message: '#^Instanceof between Rubix\\ML\\Datasets\\Labeled and Rubix\\ML\\Datasets\\Labeled will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue + count: 1 + path: src/Graph/Trees/VantageTree.php + + - + message: '#^Parameter \#1 \$a of method Rubix\\ML\\Kernels\\Distance\\Distance\:\:compute\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 5 + path: src/Graph/Trees/VantageTree.php + + - + message: '#^Method Rubix\\ML\\GridSearch\:\:combine\(\) should return list\\> but returns list\, mixed\>\>\.$#' + identifier: return.type + count: 1 + path: src/GridSearch.php + + - + message: '#^Parameter \#1 \$array \(list\\) of array_values is already a list, call has no effect\.$#' + identifier: arrayValues.list + count: 1 + path: src/GridSearch.php + + - + message: '#^Property Rubix\\ML\\GridSearch\:\:\$params \(list\\>\) does not accept list\\>\.$#' + identifier: assign.propertyType + count: 1 + path: src/GridSearch.php + + - + message: '#^Parameter \#1 \.\.\.\$arg1 of function max expects non\-empty\-array, list\\> given\.$#' + identifier: argument.type + count: 1 + path: src/Kernels/Distance/Diagonal.php + + - + message: '#^Parameter \#1 \$labels of method Rubix\\ML\\NeuralNet\\Network\:\:backpropagate\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/NeuralNet/Network.php + + - + message: '#^Instanceof between Rubix\\ML\\Transformers\\Transformer and Rubix\\ML\\Transformers\\Transformer will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue + count: 1 + path: src/Pipeline.php + + - + message: '#^Parameter \#2 \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\Metric\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Regressors/GradientBoost.php + + - + message: '#^Method Rubix\\ML\\Regressors\\KNNRegressor\:\:nearest\(\) should return array\{list\, list\\} but returns array\{array\, float\|int\>, array\, float\>\}\.$#' + identifier: return.type + count: 1 + path: src/Regressors/KNNRegressor.php + + - + message: '#^Parameter \#1 \$a of method Rubix\\ML\\Kernels\\Distance\\Distance\:\:compute\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Regressors/KNNRegressor.php + + - + message: '#^Parameter \#1 \$array \(list\\) of array_values is already a list, call has no effect\.$#' + identifier: arrayValues.list + count: 1 + path: src/Regressors/KNNRegressor.php + + - + message: '#^Parameter \#2 \$b of method Rubix\\ML\\Kernels\\Distance\\Distance\:\:compute\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Regressors/KNNRegressor.php + + - + message: '#^Property Rubix\\ML\\Regressors\\KNNRegressor\:\:\$labels \(list\\) does not accept array\\.$#' + identifier: assign.propertyType + count: 1 + path: src/Regressors/KNNRegressor.php + + - + message: '#^Instanceof between Rubix\\ML\\NeuralNet\\Layers\\Hidden and Rubix\\ML\\NeuralNet\\Layers\\Hidden will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue + count: 1 + path: src/Regressors/MLPRegressor.php + + - + message: '#^Parameter \#2 \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\Metric\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Regressors/MLPRegressor.php + + - + message: '#^Method Rubix\\ML\\Specifications\\SpecificationChain\:\:__construct\(\) has Rubix\\ML\\Exceptions\\InvalidArgumentException in PHPDoc @throws tag but it''s not thrown\.$#' + identifier: throws.unusedType + count: 1 + path: src/Specifications/SpecificationChain.php + + - + message: '#^Parameter \#2 \$callback of function array_walk expects callable\(array\, int\|string\)\: mixed, array\{\$this\(Rubix\\ML\\Transformers\\BooleanConverter\), ''convert''\} given\.$#' + identifier: argument.type + count: 1 + path: src/Transformers/BooleanConverter.php + + - + message: '#^Parameter \#1 \$width of function imagecreatetruecolor expects int\<1, max\>, int given\.$#' + identifier: argument.type + count: 1 + path: src/Transformers/ImageResizer.php + + - + message: '#^Parameter \#2 \$callback of function array_walk expects callable\(array\, int\|string\)\: mixed, array\{\$this\(Rubix\\ML\\Transformers\\ImageResizer\), ''resize''\} given\.$#' + identifier: argument.type + count: 1 + path: src/Transformers/ImageResizer.php + + - + message: '#^Parameter \#2 \$height of function imagecreatetruecolor expects int\<1, max\>, int given\.$#' + identifier: argument.type + count: 1 + path: src/Transformers/ImageResizer.php + + - + message: '#^Ternary operator condition is always true\.$#' + identifier: ternary.alwaysTrue + count: 2 + path: src/Transformers/ImageResizer.php + + - + message: '#^Ternary operator condition is always true\.$#' + identifier: ternary.alwaysTrue + count: 2 + path: src/Transformers/ImageVectorizer.php + + - + message: '#^Parameter \#1 \.\.\.\$arg1 of function max expects non\-empty\-array, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Transformers/IntervalDiscretizer.php + + - + message: '#^Parameter \#1 \.\.\.\$arg1 of function min expects non\-empty\-array, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Transformers/IntervalDiscretizer.php + + - + message: '#^Property Rubix\\ML\\Transformers\\MissingDataImputer\:\:\$strategies \(list\\|null\) does not accept non\-empty\-array\, Rubix\\ML\\Strategies\\Strategy\>\.$#' + identifier: assign.propertyType + count: 1 + path: src/Transformers/MissingDataImputer.php + + - + message: '#^Property Rubix\\ML\\Transformers\\MissingDataImputer\:\:\$types \(list\\|null\) does not accept non\-empty\-array\, Rubix\\ML\\DataType\>\.$#' + identifier: assign.propertyType + count: 1 + path: src/Transformers/MissingDataImputer.php + + - + message: '#^Parameter \#2 \$callback of function array_walk expects callable\(array\, int\|string\)\: mixed, array\{\$this\(Rubix\\ML\\Transformers\\MultibyteTextNormalizer\), ''normalize''\} given\.$#' + identifier: argument.type + count: 1 + path: src/Transformers/MultibyteTextNormalizer.php + + - + message: '#^Call to function is_string\(\) with string will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: src/Transformers/RegexFilter.php + + - + message: '#^Call to function is_string\(\) with string will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: src/Transformers/StopWordFilter.php + + - + message: '#^Parameter \#1 \$a of method Rubix\\ML\\Kernels\\Distance\\Distance\:\:compute\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Transformers/TSNE.php + + - + message: '#^Parameter \#2 \$b of method Rubix\\ML\\Kernels\\Distance\\Distance\:\:compute\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Transformers/TSNE.php + + - + message: '#^Parameter \#2 \$callback of function array_walk expects callable\(array\, int\|string\)\: mixed, array\{\$this\(Rubix\\ML\\Transformers\\TextNormalizer\), ''normalize''\} given\.$#' + identifier: argument.type + count: 1 + path: src/Transformers/TextNormalizer.php + + - + message: '#^Parameter \#2 \$callback of function array_walk expects callable\(array\, int\|string\)\: mixed, array\{\$this\(Rubix\\ML\\Transformers\\TokenHashingVectorizer\), ''vectorize''\} given\.$#' + identifier: argument.type + count: 1 + path: src/Transformers/TokenHashingVectorizer.php + + - + message: '#^Parameter &\$sample by\-ref type of method Rubix\\ML\\Transformers\\TokenHashingVectorizer\:\:vectorize\(\) expects list\, array\, mixed\> given\.$#' + identifier: parameterByRef.type + count: 1 + path: src/Transformers/TokenHashingVectorizer.php + + - + message: '#^Parameter \#1 \.\.\.\$arg1 of function max expects non\-empty\-array, array\<\(int&T\)\|\(string&T\), float\|int\> given\.$#' + identifier: argument.type + count: 1 + path: src/functions.php + + - + message: '#^Parameter \#1 \.\.\.\$arg1 of function min expects non\-empty\-array, array\<\(int&T\)\|\(string&T\), float\|int\> given\.$#' + identifier: argument.type + count: 1 + path: src/functions.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/AnomalyDetectors/LodaTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Metrics\\RSquared\:\:score\(\) expects list\, array given\.$#' + identifier: argument.type + count: 1 + path: tests/Base/BootstrapAggregatorTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Encoding'' and Rubix\\ML\\Encoding will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Base/ReportTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Classifiers/AdaBoostTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Encoding'' and Rubix\\ML\\Encoding will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 2 + path: tests/Classifiers/ClassificationTreeTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsArray\(\) with array\ will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Classifiers/ClassificationTreeTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 2 + path: tests/Classifiers/ClassificationTreeTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsArray\(\) with array\ will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Classifiers/ExtraTreeClassifierTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 2 + path: tests/Classifiers/ExtraTreeClassifierTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Classifiers/GaussianNBTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Classifiers/KDNeighborsTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Classifiers/KNearestNeighborsTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Classifiers/KNearestNeighborsTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsArray\(\) with array\ will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Classifiers/LogisticRegressionTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Classifiers/LogisticRegressionTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsArray\(\) with array\ will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Classifiers/LogitBoostTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Classifiers/LogitBoostTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Encoding'' and Rubix\\ML\\Encoding will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Classifiers/MultilayerPerceptronTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Classifiers/MultilayerPerceptronTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Classifiers/NaiveBayesTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Classifiers/OneVsRestTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Classifiers/RadiusNeighborsTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsArray\(\) with array\ will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Classifiers/RandomForestTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Classifiers/RandomForestTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Classifiers/SVCTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Classifiers/SoftmaxClassifierTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\VMeasure\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Clusterers/DBSCANTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsArray\(\) with list\\> will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Clusterers/FuzzyCMeansTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\VMeasure\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Clusterers/FuzzyCMeansTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsArray\(\) with array\ will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Clusterers/GaussianMixtureTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsArray\(\) with list\\> will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 2 + path: tests/Clusterers/GaussianMixtureTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\VMeasure\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Clusterers/GaussianMixtureTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsArray\(\) with array\ will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Clusterers/KMeansTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsArray\(\) with list\\> will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Clusterers/KMeansTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\VMeasure\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Clusterers/KMeansTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsArray\(\) with list\\> will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Clusterers/MeanShiftTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsFloat\(\) with float will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Clusterers/MeanShiftTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\VMeasure\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/Clusterers/MeanShiftTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Tuple'' and Rubix\\ML\\Tuple will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Metrics/AccuracyTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\AccuracyTest\:\:scoreProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/AccuracyTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\Accuracy\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/AccuracyTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Metrics\\Accuracy\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/AccuracyTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Tuple'' and Rubix\\ML\\Tuple will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Metrics/BrierScoreTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\BrierScoreTest\:\:scoreProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/BrierScoreTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Tuple'' and Rubix\\ML\\Tuple will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Metrics/CompletenessTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\CompletenessTest\:\:scoreProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/CompletenessTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\Completeness\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/CompletenessTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Metrics\\Completeness\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/CompletenessTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Tuple'' and Rubix\\ML\\Tuple will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Metrics/FBetaTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\FBetaTest\:\:scoreProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/FBetaTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/FBetaTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Metrics\\FBeta\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/FBetaTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Tuple'' and Rubix\\ML\\Tuple will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Metrics/HomogeneityTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\HomogeneityTest\:\:scoreProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/HomogeneityTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\Homogeneity\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/HomogeneityTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Metrics\\Homogeneity\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/HomogeneityTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Tuple'' and Rubix\\ML\\Tuple will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Metrics/InformednessTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\InformednessTest\:\:scoreProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/InformednessTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\Informedness\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/InformednessTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Metrics\\Informedness\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/InformednessTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Tuple'' and Rubix\\ML\\Tuple will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Metrics/MCCTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\MCCTest\:\:scoreProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/MCCTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\MCC\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/MCCTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Metrics\\MCC\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/MCCTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Tuple'' and Rubix\\ML\\Tuple will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Metrics/MeanAbsoluteErrorTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\MeanAbsoluteErrorTest\:\:scoreProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/MeanAbsoluteErrorTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\MeanAbsoluteError\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/MeanAbsoluteErrorTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Metrics\\MeanAbsoluteError\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/MeanAbsoluteErrorTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Tuple'' and Rubix\\ML\\Tuple will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Metrics/MeanSquaredErrorTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\MeanSquaredErrorTest\:\:scoreProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/MeanSquaredErrorTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\MeanSquaredError\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/MeanSquaredErrorTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Metrics\\MeanSquaredError\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/MeanSquaredErrorTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Tuple'' and Rubix\\ML\\Tuple will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Metrics/MedianAbsoluteErrorTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\MedianAbsoluteErrorTest\:\:scoreProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/MedianAbsoluteErrorTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\MedianAbsoluteError\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/MedianAbsoluteErrorTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Metrics\\MedianAbsoluteError\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/MedianAbsoluteErrorTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Tuple'' and Rubix\\ML\\Tuple will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Metrics/ProbabilisticAccuracyTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\ProbabilisticAccuracyTest\:\:scoreProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/ProbabilisticAccuracyTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Tuple'' and Rubix\\ML\\Tuple will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Metrics/RMSETest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\RMSETest\:\:scoreProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/RMSETest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Tuple'' and Rubix\\ML\\Tuple will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Metrics/RSquaredTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\RSquaredTest\:\:scoreProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/RSquaredTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\RSquared\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/RSquaredTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Metrics\\RSquared\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/RSquaredTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Tuple'' and Rubix\\ML\\Tuple will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Metrics/RandIndexTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\RandIndexTest\:\:scoreProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/RandIndexTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\RandIndex\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/RandIndexTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Metrics\\RandIndex\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/RandIndexTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Tuple'' and Rubix\\ML\\Tuple will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Metrics/SMAPETest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\SMAPETest\:\:scoreProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/SMAPETest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\SMAPETest\:\:testScore\(\) has parameter \$labels with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/SMAPETest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\SMAPETest\:\:testScore\(\) has parameter \$predictions with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/SMAPETest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\SMAPE\:\:score\(\) expects list\, array given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/SMAPETest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Metrics\\SMAPE\:\:score\(\) expects list\, array given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/SMAPETest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Tuple'' and Rubix\\ML\\Tuple will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Metrics/TopKAccuracyTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\TopKAccuracyTest\:\:score\(\) has parameter \$labels with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/TopKAccuracyTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\TopKAccuracyTest\:\:score\(\) has parameter \$probabilities with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/TopKAccuracyTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\TopKAccuracyTest\:\:scoreProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/TopKAccuracyTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\TopKAccuracy\:\:score\(\) expects list\, array given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/TopKAccuracyTest.php + + - + message: '#^Parameter \$probabilities of method Rubix\\ML\\CrossValidation\\Metrics\\TopKAccuracy\:\:score\(\) expects list\\>, array given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/TopKAccuracyTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Tuple'' and Rubix\\ML\\Tuple will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Metrics/VMeasureTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Metrics\\VMeasureTest\:\:scoreProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Metrics/VMeasureTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Metrics\\VMeasure\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/VMeasureTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Metrics\\VMeasure\:\:score\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Metrics/VMeasureTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Report'' and Rubix\\ML\\Report will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Reports/AggregateReportTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Report'' and Rubix\\ML\\Report will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Reports/ConfusionMatrixTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Reports\\ConfusionMatrixTest\:\:generateProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Reports/ConfusionMatrixTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Reports\\ConfusionMatrixTest\:\:testGenerate\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Reports/ConfusionMatrixTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Reports\\ConfusionMatrix\:\:generate\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Reports/ConfusionMatrixTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Reports\\ConfusionMatrix\:\:generate\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Reports/ConfusionMatrixTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Report'' and Rubix\\ML\\Report will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Reports/ContingencyTableTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Reports\\ContingencyTableTest\:\:generateProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Reports/ContingencyTableTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Reports\\ContingencyTableTest\:\:testGenerate\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Reports/ContingencyTableTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Reports\\ContingencyTable\:\:generate\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Reports/ContingencyTableTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Reports\\ContingencyTable\:\:generate\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Reports/ContingencyTableTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Report'' and Rubix\\ML\\Report will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Reports/ErrorAnalysisTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Reports\\ErrorAnalysisTest\:\:generateProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Reports/ErrorAnalysisTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Reports\\ErrorAnalysis\:\:generate\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Reports/ErrorAnalysisTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Reports\\ErrorAnalysis\:\:generate\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Reports/ErrorAnalysisTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Report'' and Rubix\\ML\\Report will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/CrossValidation/Reports/MulticlassBreakdownTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Reports\\MulticlassBreakdownTest\:\:generateProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Reports/MulticlassBreakdownTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\CrossValidation\\Reports\\MulticlassBreakdownTest\:\:testGenerate\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/CrossValidation/Reports/MulticlassBreakdownTest.php + + - + message: '#^Parameter \$labels of method Rubix\\ML\\CrossValidation\\Reports\\MulticlassBreakdown\:\:generate\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Reports/MulticlassBreakdownTest.php + + - + message: '#^Parameter \$predictions of method Rubix\\ML\\CrossValidation\\Reports\\MulticlassBreakdown\:\:generate\(\) expects list\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/CrossValidation/Reports/MulticlassBreakdownTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Datasets\\\\Dataset'' and Rubix\\ML\\Datasets\\Labeled will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Datasets/Generators/AgglomerateTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Datasets\\\\Labeled'' and Rubix\\ML\\Datasets\\Labeled will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Datasets/Generators/AgglomerateTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Datasets\\\\Dataset'' and Rubix\\ML\\Datasets\\Unlabeled will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Datasets/Generators/BlobTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Datasets\\\\Generators\\\\Blob'' and Rubix\\ML\\Datasets\\Generators\\Blob will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Datasets/Generators/BlobTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Datasets\\\\Generators\\\\Generator'' and Rubix\\ML\\Datasets\\Generators\\Blob will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Datasets/Generators/BlobTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Datasets\\\\Unlabeled'' and Rubix\\ML\\Datasets\\Unlabeled will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Datasets/Generators/BlobTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Datasets\\\\Dataset'' and Rubix\\ML\\Datasets\\Labeled will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Datasets/Generators/CircleTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Datasets\\\\Labeled'' and Rubix\\ML\\Datasets\\Labeled will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Datasets/Generators/CircleTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Datasets\\\\Dataset'' and Rubix\\ML\\Datasets\\Labeled will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Datasets/Generators/HalfMoonTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Datasets\\\\Labeled'' and Rubix\\ML\\Datasets\\Labeled will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Datasets/Generators/HalfMoonTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Datasets\\\\Dataset'' and Rubix\\ML\\Datasets\\Labeled will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Datasets/Generators/HyperplaneTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Datasets\\\\Labeled'' and Rubix\\ML\\Datasets\\Labeled will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Datasets/Generators/HyperplaneTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Datasets\\\\Dataset'' and Rubix\\ML\\Datasets\\Labeled will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Datasets/Generators/SwissRollTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Datasets\\\\Labeled'' and Rubix\\ML\\Datasets\\Labeled will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Datasets/Generators/SwissRollTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Datasets\\\\Labeled'' and Rubix\\ML\\Datasets\\Labeled will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 8 + path: tests/Datasets/LabeledTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Report'' and Rubix\\ML\\Report will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 2 + path: tests/Datasets/LabeledTest.php + + - + message: '#^Parameter \#1 \$array \(list\\>\) of array_values is already a list, call has no effect\.$#' + identifier: arrayValues.list + count: 1 + path: tests/Extractors/NDJSONTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\Encoding'' and Rubix\\ML\\Encoding will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/Helpers/GraphvizTest.php + + - + message: '#^Method Rubix\\ML\\Tests\\Helpers\\ParamsTest\:\:stringify\(\) has parameter \$params with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/Helpers/ParamsTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\NeuralNet\\\\Initializers\\\\LegacyConstant'' and Rubix\\ML\\NeuralNet\\Initializers\\LegacyConstant will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/NeuralNet/Initializers/LegacyConstantTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Rubix\\\\ML\\\\NeuralNet\\\\Initializers\\\\LegacyInitializer'' and Rubix\\ML\\NeuralNet\\Initializers\\LegacyConstant will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/NeuralNet/Initializers/LegacyConstantTest.php + + - + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Tensor\\\\Matrix'' and Tensor\\Matrix will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType + count: 1 + path: tests/NeuralNet/Initializers/LegacyConstantTest.php diff --git a/phpstan.neon b/phpstan.neon index 4d1ae5782..72e6086ac 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,3 +1,5 @@ +includes: + - phpstan-baseline.neon parameters: level: 8 paths: @@ -7,3 +9,4 @@ parameters: excludePaths: - src/Backends/Amp.php - src/Backends/Swoole.php + - tests/Backends/SwooleTest.php diff --git a/src/AnomalyDetectors/GaussianMLE.php b/src/AnomalyDetectors/GaussianMLE.php index 560a2963d..1c221dc6a 100644 --- a/src/AnomalyDetectors/GaussianMLE.php +++ b/src/AnomalyDetectors/GaussianMLE.php @@ -208,9 +208,11 @@ public function train(Dataset $dataset) : void $this->variances[$column] = $variance; } - $epsilon = max($this->smoothing * max($this->variances), CPU::epsilon()); + /** @var non-empty-array $variances */ + $variances = $this->variances; + $epsilon = max($this->smoothing * max($variances), CPU::epsilon()); - foreach ($this->variances as &$variance) { + foreach ($variances as &$variance) { $variance += $epsilon; } diff --git a/src/AnomalyDetectors/Loda.php b/src/AnomalyDetectors/Loda.php index 0500624f6..c8fdbf2bf 100644 --- a/src/AnomalyDetectors/Loda.php +++ b/src/AnomalyDetectors/Loda.php @@ -239,6 +239,7 @@ public function train(Dataset $dataset) : void ->asArray(); foreach ($projections as $values) { + /** @var non-empty-array $values */ $min = (float) min($values); $max = (float) max($values); @@ -327,7 +328,7 @@ public function partial(Dataset $dataset) : void * Make predictions from a dataset. * * @param Dataset $dataset - * @return list + * @return array */ public function predict(Dataset $dataset) : array { @@ -339,7 +340,7 @@ public function predict(Dataset $dataset) : array * * @param Dataset $dataset * @throws RuntimeException - * @return list + * @return array */ public function score(Dataset $dataset) : array { @@ -362,7 +363,7 @@ public function score(Dataset $dataset) : array * created during training. * * @param list> $projections - * @return list + * @return array */ protected function densities(array $projections) : array { diff --git a/src/AnomalyDetectors/RobustZScore.php b/src/AnomalyDetectors/RobustZScore.php index ff689aecb..a6baff2b2 100644 --- a/src/AnomalyDetectors/RobustZScore.php +++ b/src/AnomalyDetectors/RobustZScore.php @@ -49,29 +49,21 @@ class RobustZScore implements Estimator, Learner, Scoring, Persistable /** * The expected value of the MAD as n asymptotes. - * - * @var float */ - protected const ETA = 0.6745; + protected const float ETA = 0.6745; /** * The minimum z score to be flagged as an anomaly. - * - * @var float */ protected float $threshold; /** * The weight of the maximum per sample z score in the overall anomaly score. - * - * @var float */ protected float $beta; /** * The amount of epsilon smoothing added to the median absolute deviation (MAD) of each feature. - * - * @var float */ protected float $smoothing; @@ -214,9 +206,11 @@ public function train(Dataset $dataset) : void $this->mads[$column] = $mad; } - $epsilon = max($this->smoothing * max($this->mads), CPU::epsilon()); + /** @var non-empty-array $mads */ + $mads = $this->mads; + $epsilon = max($this->smoothing * max($mads), CPU::epsilon()); - foreach ($this->mads as &$mad) { + foreach ($mads as &$mad) { $mad += $epsilon; } } @@ -286,10 +280,9 @@ protected function zHat(array $sample) : float ); } - $zHat = (1.0 - $this->beta) * Stats::mean($scores) + /** @var non-empty-array $scores */ + return (1.0 - $this->beta) * Stats::mean($scores) + $this->beta * max($scores); - - return $zHat; } /** diff --git a/src/Backends/Tasks/TrainAndValidate.php b/src/Backends/Tasks/TrainAndValidate.php index c51cc9007..70837dd8b 100644 --- a/src/Backends/Tasks/TrainAndValidate.php +++ b/src/Backends/Tasks/TrainAndValidate.php @@ -40,9 +40,12 @@ public static function score( $predictions = $estimator->predict($testing); - $score = $metric->score($predictions, $testing->labels()); - - return $score; + /** @var list $labels */ + $labels = $testing->labels(); + return $metric->score( + predictions: $predictions, + labels: $labels + ); } /** diff --git a/src/BootstrapAggregator.php b/src/BootstrapAggregator.php index 59a3f7d47..7878326b8 100644 --- a/src/BootstrapAggregator.php +++ b/src/BootstrapAggregator.php @@ -46,7 +46,7 @@ class BootstrapAggregator implements Estimator, Learner, Parallel, Persistable * * @var list */ - protected const COMPATIBLE_ESTIMATOR_TYPES = [ + protected const array COMPATIBLE_ESTIMATOR_TYPES = [ EstimatorType::CLASSIFIER, EstimatorType::REGRESSOR, EstimatorType::ANOMALY_DETECTOR, @@ -54,29 +54,21 @@ class BootstrapAggregator implements Estimator, Learner, Parallel, Persistable /** * The minimum size of each training subset. - * - * @var int */ - protected const MIN_SUBSAMPLE = 1; + protected const int MIN_SUBSAMPLE = 1; /** * The base learner. - * - * @var Learner */ protected Learner $base; /** * The number of base learners to train in the ensemble. - * - * @var int */ protected int $estimators; /** * The ratio of samples from the training set to randomly subsample to train each base learner. - * - * @var float */ protected float $ratio; @@ -148,7 +140,7 @@ public function compatibility() : array * * @internal * - * @return mixed[] + * @return array */ public function params() : array { @@ -207,7 +199,9 @@ public function train(Dataset $dataset) : void $this->backend->enqueue($task); } - $this->ensemble = $this->backend->process(); + /** @var list $process */ + $process = $this->backend->process(); + $this->ensemble = $process; } /** @@ -215,7 +209,7 @@ public function train(Dataset $dataset) : void * * @param Dataset $dataset * @throws RuntimeException - * @return mixed[] + * @return array */ public function predict(Dataset $dataset) : array { @@ -251,7 +245,7 @@ public function predict(Dataset $dataset) : array */ protected function decideDiscrete(array $votes) : string { - /** @var array $counts */ + /** @var array> $counts */ $counts = array_count_values($votes); return argmax($counts); diff --git a/src/Classifiers/AdaBoost.php b/src/Classifiers/AdaBoost.php index 978c4e047..1bae4d7de 100644 --- a/src/Classifiers/AdaBoost.php +++ b/src/Classifiers/AdaBoost.php @@ -133,7 +133,7 @@ class AdaBoost implements Estimator, Learner, Probabilistic, Verbose, Persistabl /** * The loss at each epoch from the last training session. * - * @var list]|null + * @var list|null */ protected ?array $losses = null; @@ -255,7 +255,7 @@ public function trained() : bool /** * Return an iterable progress table with the steps from the last training session. * - * @return Generator + * @return Generator */ public function steps() : Generator { @@ -274,7 +274,7 @@ public function steps() : Generator /** * Return the loss at each epoch of the last training session. * - * @return float[]|null + * @return list|null */ public function losses() : ?array { @@ -337,9 +337,7 @@ public function train(Dataset $dataset) : void } if (is_nan($loss)) { - if ($this->logger) { - $this->logger->warning('Numerical instability detected'); - } + $this->logger?->warning('Numerical instability detected'); break; } diff --git a/src/CrossValidation/Metrics/Metric.php b/src/CrossValidation/Metrics/Metric.php index fe962242a..dc2cb39ac 100644 --- a/src/CrossValidation/Metrics/Metric.php +++ b/src/CrossValidation/Metrics/Metric.php @@ -12,16 +12,16 @@ interface Metric extends Stringable * * @return \Rubix\ML\Tuple{float,float} */ - public function range() : Tuple; + public function range(): Tuple; /** * The estimator types that this metric is compatible with. * + * @return list<\Rubix\ML\EstimatorType> * @internal * - * @return list<\Rubix\ML\EstimatorType> */ - public function compatibility() : array; + public function compatibility(): array; /** * Score a set of predictions and their ground-truth labels. @@ -30,5 +30,5 @@ public function compatibility() : array; * @param list $labels * @return float */ - public function score(array $predictions, array $labels) : float; + public function score(array $predictions, array $labels): float; } diff --git a/tests/AnomalyDetectors/GaussianMLETest.php b/tests/AnomalyDetectors/GaussianMLETest.php index 8d3459080..57e922a4d 100644 --- a/tests/AnomalyDetectors/GaussianMLETest.php +++ b/tests/AnomalyDetectors/GaussianMLETest.php @@ -144,7 +144,7 @@ public function testTrainIncompatible() : void { $this->expectException(InvalidArgumentException::class); - $this->estimator->train(Unlabeled::quick([['bad']])); + $this->estimator->train(Unlabeled::quick(samples: [['bad']])); } public function testPredictUntrained() : void