From 1f3d0cbbc6f2ccdf9e22d8c979b25d849fd9443b Mon Sep 17 00:00:00 2001 From: Andrew DalPino Date: Thu, 26 Dec 2024 13:32:35 -0600 Subject: [PATCH] Bump version and fix coding style --- CHANGELOG.md | 3 +++ src/AnomalyDetectors/GaussianMLE.php | 2 +- src/AnomalyDetectors/IsolationForest.php | 4 ++-- src/AnomalyDetectors/Loda.php | 2 +- src/AnomalyDetectors/OneClassSVM.php | 2 +- src/AnomalyDetectors/RobustZScore.php | 2 +- src/Backends/Amp.php | 4 ++-- src/BootstrapAggregator.php | 4 ++-- src/Classifiers/AdaBoost.php | 4 ++-- src/Classifiers/ClassificationTree.php | 2 +- src/Classifiers/ExtraTreeClassifier.php | 2 +- src/Classifiers/GaussianNB.php | 2 +- src/Classifiers/LogisticRegression.php | 4 ++-- src/Classifiers/LogitBoost.php | 2 +- src/Classifiers/MultilayerPerceptron.php | 8 +++---- src/Classifiers/NaiveBayes.php | 2 +- src/Classifiers/OneVsRest.php | 2 +- src/Classifiers/SVC.php | 2 +- src/Classifiers/SoftmaxClassifier.php | 4 ++-- src/Clusterers/FuzzyCMeans.php | 4 ++-- src/Clusterers/GaussianMixture.php | 4 ++-- src/Clusterers/KMeans.php | 4 ++-- src/Clusterers/MeanShift.php | 4 ++-- src/CommitteeMachine.php | 10 ++++---- src/CrossValidation/Metrics/Accuracy.php | 2 +- src/CrossValidation/Metrics/Completeness.php | 2 +- src/CrossValidation/Metrics/FBeta.php | 2 +- src/CrossValidation/Metrics/Homogeneity.php | 2 +- src/CrossValidation/Metrics/Informedness.php | 2 +- src/CrossValidation/Metrics/MCC.php | 2 +- .../Metrics/MeanAbsoluteError.php | 2 +- .../Metrics/MeanSquaredError.php | 2 +- .../Metrics/MedianAbsoluteError.php | 2 +- src/CrossValidation/Metrics/RSquared.php | 2 +- src/CrossValidation/Metrics/RandIndex.php | 2 +- src/CrossValidation/Metrics/SMAPE.php | 2 +- src/CrossValidation/Metrics/VMeasure.php | 2 +- .../Reports/AggregateReport.php | 4 ++-- .../Reports/ConfusionMatrix.php | 2 +- .../Reports/ContingencyTable.php | 2 +- src/CrossValidation/Reports/ErrorAnalysis.php | 2 +- .../Reports/MulticlassBreakdown.php | 2 +- src/Datasets/Dataset.php | 8 +++---- src/Datasets/Generators/Agglomerate.php | 4 ++-- src/Datasets/Labeled.php | 2 +- src/Datasets/Unlabeled.php | 2 +- src/Estimator.php | 2 +- src/Graph/Nodes/Ball.php | 6 ++--- src/Graph/Nodes/Box.php | 6 ++--- src/Graph/Nodes/HasBinaryChildren.php | 2 +- src/Graph/Nodes/Hypercube.php | 2 +- src/Graph/Nodes/Isolator.php | 6 ++--- .../Nodes/Traits/HasBinaryChildrenTrait.php | 2 +- src/Graph/Nodes/VantagePoint.php | 2 +- src/Graph/Trees/BallTree.php | 2 +- src/Graph/Trees/DecisionTree.php | 4 ++-- src/GridSearch.php | 2 +- src/Kernels/Distance/Canberra.php | 2 +- src/Kernels/Distance/Cosine.php | 2 +- src/Kernels/Distance/Diagonal.php | 2 +- src/Kernels/Distance/Euclidean.php | 2 +- src/Kernels/Distance/Gower.php | 2 +- src/Kernels/Distance/Hamming.php | 2 +- src/Kernels/Distance/Jaccard.php | 2 +- src/Kernels/Distance/Manhattan.php | 2 +- src/Kernels/Distance/Minkowski.php | 2 +- src/Kernels/Distance/SafeEuclidean.php | 2 +- src/Kernels/Distance/SparseCosine.php | 2 +- src/NeuralNet/FeedForward.php | 10 ++++---- src/NeuralNet/Layers/BatchNorm.php | 4 ++-- src/NeuralNet/Layers/Binary.php | 2 +- src/NeuralNet/Layers/Continuous.php | 2 +- src/NeuralNet/Layers/Dense.php | 4 ++-- src/NeuralNet/Layers/Multiclass.php | 2 +- src/NeuralNet/Layers/PReLU.php | 4 ++-- src/NeuralNet/Layers/Parametric.php | 2 +- src/NeuralNet/Layers/Swish.php | 4 ++-- src/NeuralNet/Network.php | 2 +- src/NeuralNet/Optimizers/AdaGrad.php | 6 ++--- src/NeuralNet/Optimizers/AdaMax.php | 4 ++-- src/NeuralNet/Optimizers/Adam.php | 6 ++--- src/NeuralNet/Optimizers/Cyclical.php | 4 ++-- src/NeuralNet/Optimizers/Momentum.php | 6 ++--- src/NeuralNet/Optimizers/Optimizer.php | 4 ++-- src/NeuralNet/Optimizers/RMSProp.php | 6 ++--- src/NeuralNet/Optimizers/StepDecay.php | 4 ++-- src/NeuralNet/Optimizers/Stochastic.php | 4 ++-- src/NeuralNet/Snapshot.php | 8 +++---- src/PersistentModel.php | 2 +- src/Pipeline.php | 6 ++--- src/Regressors/Adaline.php | 4 ++-- src/Regressors/ExtraTreeRegressor.php | 2 +- src/Regressors/GradientBoost.php | 2 +- src/Regressors/MLPRegressor.php | 8 +++---- src/Regressors/RegressionTree.php | 2 +- src/Regressors/Ridge.php | 2 +- src/Regressors/SVR.php | 2 +- src/Specifications/SpecificationChain.php | 6 ++--- src/Transformers/BM25Transformer.php | 2 +- src/Transformers/BooleanConverter.php | 2 +- src/Transformers/GaussianRandomProjector.php | 2 +- src/Transformers/HotDeckImputer.php | 2 +- src/Transformers/ImageResizer.php | 2 +- src/Transformers/ImageRotator.php | 2 +- src/Transformers/ImageVectorizer.php | 2 +- src/Transformers/IntervalDiscretizer.php | 2 +- src/Transformers/KNNImputer.php | 4 ++-- src/Transformers/L1Normalizer.php | 2 +- src/Transformers/L2Normalizer.php | 2 +- src/Transformers/LambdaFunction.php | 2 +- .../LinearDiscriminantAnalysis.php | 2 +- src/Transformers/MaxAbsoluteScaler.php | 2 +- src/Transformers/MinMaxNormalizer.php | 2 +- src/Transformers/MissingDataImputer.php | 6 ++--- src/Transformers/MultibyteTextNormalizer.php | 2 +- src/Transformers/NumericStringConverter.php | 2 +- src/Transformers/OneHotEncoder.php | 23 ++++++++++--------- src/Transformers/PolynomialExpander.php | 2 +- .../PrincipalComponentAnalysis.php | 2 +- src/Transformers/RegexFilter.php | 2 +- src/Transformers/RobustStandardizer.php | 2 +- src/Transformers/TSNE.php | 2 +- src/Transformers/TextNormalizer.php | 2 +- src/Transformers/TfIdfTransformer.php | 2 +- src/Transformers/TokenHashingVectorizer.php | 2 +- src/Transformers/TruncatedSVD.php | 2 +- src/Transformers/WordCountVectorizer.php | 2 +- src/Transformers/ZScaleStandardizer.php | 2 +- src/constants.php | 2 +- .../CrossValidation/Metrics/AccuracyTest.php | 2 +- .../Metrics/BrierScoreTest.php | 2 +- .../Metrics/CompletenessTest.php | 2 +- tests/CrossValidation/Metrics/FBetaTest.php | 2 +- .../Metrics/HomogeneityTest.php | 2 +- .../Metrics/InformednessTest.php | 2 +- tests/CrossValidation/Metrics/MCCTest.php | 2 +- .../Metrics/MeanAbsoluteErrorTest.php | 2 +- .../Metrics/MeanSquaredErrorTest.php | 2 +- .../Metrics/MedianAbsoluteErrorTest.php | 2 +- .../Metrics/ProbabilisticAccuracyTest.php | 2 +- tests/CrossValidation/Metrics/RMSETest.php | 2 +- .../CrossValidation/Metrics/RSquaredTest.php | 2 +- .../CrossValidation/Metrics/RandIndexTest.php | 2 +- tests/CrossValidation/Metrics/SMAPETest.php | 2 +- .../Metrics/TopKAccuracyTest.php | 2 +- .../CrossValidation/Metrics/VMeasureTest.php | 2 +- .../Reports/ConfusionMatrixTest.php | 2 +- .../Reports/ContingencyTableTest.php | 2 +- .../Reports/ErrorAnalysisTest.php | 2 +- .../Reports/MulticlassBreakdownTest.php | 2 +- tests/DataTypeTest.php | 4 ++-- tests/FunctionsTest.php | 12 +++++----- tests/Helpers/ParamsTest.php | 2 +- tests/Helpers/StatsTest.php | 8 +++---- tests/Kernels/Distance/CanberraTest.php | 2 +- tests/Kernels/Distance/CosineTest.php | 2 +- tests/Kernels/Distance/DiagonalTest.php | 2 +- tests/Kernels/Distance/EuclideanTest.php | 2 +- tests/Kernels/Distance/GowerTest.php | 2 +- tests/Kernels/Distance/HammingTest.php | 2 +- tests/Kernels/Distance/JaccardTest.php | 2 +- tests/Kernels/Distance/ManhattanTest.php | 2 +- tests/Kernels/Distance/MinkowskiTest.php | 2 +- tests/Kernels/Distance/SafeEuclideanTest.php | 2 +- tests/Kernels/Distance/SparseCosineTest.php | 2 +- .../NeuralNet/ActivationFunctions/ELUTest.php | 4 ++-- .../ActivationFunctions/GELUTest.php | 4 ++-- .../HyperbolicTangentTest.php | 4 ++-- .../ActivationFunctions/LeakyReLUTest.php | 4 ++-- .../ActivationFunctions/ReLUTest.php | 4 ++-- .../ActivationFunctions/SELUTest.php | 4 ++-- .../ActivationFunctions/SiLUTest.php | 4 ++-- .../ActivationFunctions/SigmoidTest.php | 4 ++-- .../ActivationFunctions/SoftPlusTest.php | 4 ++-- .../ActivationFunctions/SoftmaxTest.php | 4 ++-- .../ActivationFunctions/SoftsignTest.php | 4 ++-- .../ThresholdedReLUTest.php | 4 ++-- .../CostFunctions/CrossEntropyTest.php | 4 ++-- .../NeuralNet/CostFunctions/HuberLossTest.php | 4 ++-- .../CostFunctions/LeastSquaresTest.php | 4 ++-- .../CostFunctions/RelativeEntropyTest.php | 4 ++-- tests/NeuralNet/Optimizers/AdaGradTest.php | 4 ++-- tests/NeuralNet/Optimizers/AdaMaxTest.php | 4 ++-- tests/NeuralNet/Optimizers/AdamTest.php | 4 ++-- tests/NeuralNet/Optimizers/CyclicalTest.php | 4 ++-- tests/NeuralNet/Optimizers/MomentumTest.php | 4 ++-- tests/NeuralNet/Optimizers/RMSPropTest.php | 4 ++-- tests/NeuralNet/Optimizers/StepDecayTest.php | 4 ++-- tests/NeuralNet/Optimizers/StochasticTest.php | 4 ++-- .../DatasetHasDimensionalityTest.php | 2 +- tests/Specifications/DatasetIsLabeledTest.php | 2 +- .../Specifications/DatasetIsNotEmptyTest.php | 2 +- .../EstimatorIsCompatibleWithMetricTest.php | 2 +- .../Specifications/ExtensionIsLoadedTest.php | 2 +- .../ExtensionMinimumVersionTest.php | 2 +- .../LabelsAreCompatibleWithLearnerTest.php | 2 +- .../SamplesAreCompatibleWithDistanceTest.php | 2 +- .../SamplesAreCompatibleWithEstimatorTest.php | 2 +- ...amplesAreCompatibleWithTransformerTest.php | 2 +- .../Specifications/SpecificationChainTest.php | 2 +- tests/Tokenizers/KSkipNGramTest.php | 2 +- tests/Tokenizers/NGramTest.php | 2 +- tests/Tokenizers/SentenceTest.php | 2 +- tests/Tokenizers/WhitespaceTest.php | 2 +- tests/Tokenizers/WordStemmerTest.php | 2 +- tests/Tokenizers/WordTest.php | 2 +- .../GaussianRandomProjectorTest.php | 2 +- tests/Transformers/OneHotEncoderTest.php | 4 ++-- 208 files changed, 319 insertions(+), 315 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cde414469..76c796395 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +- 2.6.0 + - You can now exclude certain categories from one-hot encoding. + - 2.5.2 - Fix bug in One-class SVM inferencing diff --git a/src/AnomalyDetectors/GaussianMLE.php b/src/AnomalyDetectors/GaussianMLE.php index 39c2435d4..560a2963d 100644 --- a/src/AnomalyDetectors/GaussianMLE.php +++ b/src/AnomalyDetectors/GaussianMLE.php @@ -133,7 +133,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/AnomalyDetectors/IsolationForest.php b/src/AnomalyDetectors/IsolationForest.php index 3cd055198..2cdfdc2fb 100644 --- a/src/AnomalyDetectors/IsolationForest.php +++ b/src/AnomalyDetectors/IsolationForest.php @@ -97,7 +97,7 @@ class IsolationForest implements Estimator, Learner, Scoring, Persistable /** * The isolation trees that make up the forest. * - * @var \Rubix\ML\Graph\Trees\ITree[] + * @var ITree[] */ protected array $trees = [ // @@ -162,7 +162,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/AnomalyDetectors/Loda.php b/src/AnomalyDetectors/Loda.php index 9cb149820..0500624f6 100644 --- a/src/AnomalyDetectors/Loda.php +++ b/src/AnomalyDetectors/Loda.php @@ -171,7 +171,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/AnomalyDetectors/OneClassSVM.php b/src/AnomalyDetectors/OneClassSVM.php index 6f0900119..bdd19775f 100644 --- a/src/AnomalyDetectors/OneClassSVM.php +++ b/src/AnomalyDetectors/OneClassSVM.php @@ -139,7 +139,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/AnomalyDetectors/RobustZScore.php b/src/AnomalyDetectors/RobustZScore.php index f271b0b75..ff689aecb 100644 --- a/src/AnomalyDetectors/RobustZScore.php +++ b/src/AnomalyDetectors/RobustZScore.php @@ -138,7 +138,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Backends/Amp.php b/src/Backends/Amp.php index f1da44e3c..06a2e265f 100644 --- a/src/Backends/Amp.php +++ b/src/Backends/Amp.php @@ -104,7 +104,7 @@ public function enqueue(Task $task, ?callable $after = null, $context = null) : * @param AmpTask $task * @param callable(mixed,mixed):void $after * @param mixed $context - * @return \Generator<\Amp\Promise> + * @return Generator<\Amp\Promise> */ public function coroutine(AmpTask $task, ?callable $after = null, $context = null) : Generator { @@ -138,7 +138,7 @@ public function process() : array * * @internal * - * @return \Generator<\Amp\Promise> + * @return Generator<\Amp\Promise> */ public function gather() : Generator { diff --git a/src/BootstrapAggregator.php b/src/BootstrapAggregator.php index fc30cc882..59a3f7d47 100644 --- a/src/BootstrapAggregator.php +++ b/src/BootstrapAggregator.php @@ -83,7 +83,7 @@ class BootstrapAggregator implements Estimator, Learner, Parallel, Persistable /** * The ensemble of estimators. * - * @var list<\Rubix\ML\Learner> + * @var list */ protected array $ensemble = [ // @@ -136,7 +136,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Classifiers/AdaBoost.php b/src/Classifiers/AdaBoost.php index bc4aff1ea..44dc8c6eb 100644 --- a/src/Classifiers/AdaBoost.php +++ b/src/Classifiers/AdaBoost.php @@ -112,7 +112,7 @@ class AdaBoost implements Estimator, Learner, Probabilistic, Verbose, Persistabl /** * The ensemble of *weak* classifiers. * - * @var \Rubix\ML\Learner[]|null + * @var Learner[]|null */ protected ?array $ensemble = 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 { diff --git a/src/Classifiers/ClassificationTree.php b/src/Classifiers/ClassificationTree.php index 94a926b45..4095f4a66 100644 --- a/src/Classifiers/ClassificationTree.php +++ b/src/Classifiers/ClassificationTree.php @@ -94,7 +94,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Classifiers/ExtraTreeClassifier.php b/src/Classifiers/ExtraTreeClassifier.php index d977df1a6..c71d08cf7 100644 --- a/src/Classifiers/ExtraTreeClassifier.php +++ b/src/Classifiers/ExtraTreeClassifier.php @@ -93,7 +93,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Classifiers/GaussianNB.php b/src/Classifiers/GaussianNB.php index a0e0fa126..7adb31127 100644 --- a/src/Classifiers/GaussianNB.php +++ b/src/Classifiers/GaussianNB.php @@ -161,7 +161,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Classifiers/LogisticRegression.php b/src/Classifiers/LogisticRegression.php index fd96596ee..75774fb70 100644 --- a/src/Classifiers/LogisticRegression.php +++ b/src/Classifiers/LogisticRegression.php @@ -196,7 +196,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { @@ -238,7 +238,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 { diff --git a/src/Classifiers/LogitBoost.php b/src/Classifiers/LogitBoost.php index 8a39be711..b59e87cea 100644 --- a/src/Classifiers/LogitBoost.php +++ b/src/Classifiers/LogitBoost.php @@ -305,7 +305,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 { diff --git a/src/Classifiers/MultilayerPerceptron.php b/src/Classifiers/MultilayerPerceptron.php index a943ebef9..b6d598f56 100644 --- a/src/Classifiers/MultilayerPerceptron.php +++ b/src/Classifiers/MultilayerPerceptron.php @@ -69,7 +69,7 @@ class MultilayerPerceptron implements Estimator, Learner, Online, Probabilistic, /** * An array composing the user-specified hidden layers of the network in order. * - * @var \Rubix\ML\NeuralNet\Layers\Hidden[] + * @var Hidden[] */ protected array $hiddenLayers; @@ -165,7 +165,7 @@ class MultilayerPerceptron implements Estimator, Learner, Online, Probabilistic, protected ?array $losses = null; /** - * @param \Rubix\ML\NeuralNet\Layers\Hidden[] $hiddenLayers + * @param Hidden[] $hiddenLayers * @param int $batchSize * @param Optimizer|null $optimizer * @param float $l2Penalty @@ -259,7 +259,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { @@ -304,7 +304,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 { diff --git a/src/Classifiers/NaiveBayes.php b/src/Classifiers/NaiveBayes.php index b6f727cd3..2815ee971 100644 --- a/src/Classifiers/NaiveBayes.php +++ b/src/Classifiers/NaiveBayes.php @@ -151,7 +151,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Classifiers/OneVsRest.php b/src/Classifiers/OneVsRest.php index 841fb2751..8be21399c 100644 --- a/src/Classifiers/OneVsRest.php +++ b/src/Classifiers/OneVsRest.php @@ -56,7 +56,7 @@ class OneVsRest implements Estimator, Learner, Probabilistic, Parallel, Persista /** * A map of each class to its binary classifier. * - * @var array<\Rubix\ML\Learner> + * @var array */ protected array $classifiers = [ // diff --git a/src/Classifiers/SVC.php b/src/Classifiers/SVC.php index 8fe04fb2f..509ed11f8 100644 --- a/src/Classifiers/SVC.php +++ b/src/Classifiers/SVC.php @@ -150,7 +150,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Classifiers/SoftmaxClassifier.php b/src/Classifiers/SoftmaxClassifier.php index e10054119..fd6f1f36b 100644 --- a/src/Classifiers/SoftmaxClassifier.php +++ b/src/Classifiers/SoftmaxClassifier.php @@ -192,7 +192,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { @@ -234,7 +234,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 { diff --git a/src/Clusterers/FuzzyCMeans.php b/src/Clusterers/FuzzyCMeans.php index 106a17725..93ce67759 100644 --- a/src/Clusterers/FuzzyCMeans.php +++ b/src/Clusterers/FuzzyCMeans.php @@ -176,7 +176,7 @@ public function type() : EstimatorType /** * Return the data types that the estimator is compatible with. * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { @@ -225,7 +225,7 @@ public function centroids() : array /** * Return an iterable progress table with the steps from the last training session. * - * @return \Generator + * @return Generator */ public function steps() : Generator { diff --git a/src/Clusterers/GaussianMixture.php b/src/Clusterers/GaussianMixture.php index fbc5d5db1..96495e329 100644 --- a/src/Clusterers/GaussianMixture.php +++ b/src/Clusterers/GaussianMixture.php @@ -188,7 +188,7 @@ public function type() : EstimatorType /** * Return the data types that the estimator is compatible with. * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { @@ -256,7 +256,7 @@ public function variances() : array /** * Return an iterable progress table with the steps from the last training session. * - * @return \Generator + * @return Generator */ public function steps() : Generator { diff --git a/src/Clusterers/KMeans.php b/src/Clusterers/KMeans.php index 420844d63..dbb409600 100644 --- a/src/Clusterers/KMeans.php +++ b/src/Clusterers/KMeans.php @@ -196,7 +196,7 @@ public function type() : EstimatorType /** * Return the data types that the estimator is compatible with. * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { @@ -256,7 +256,7 @@ public function sizes() : array /** * Return an iterable progress table with the steps from the last training session. * - * @return \Generator + * @return Generator */ public function steps() : Generator { diff --git a/src/Clusterers/MeanShift.php b/src/Clusterers/MeanShift.php index e8ac31e53..1860b603d 100644 --- a/src/Clusterers/MeanShift.php +++ b/src/Clusterers/MeanShift.php @@ -229,7 +229,7 @@ public function type() : EstimatorType /** * Return the data types that the estimator is compatible with. * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { @@ -278,7 +278,7 @@ public function centroids() : array /** * Return an iterable progress table with the steps from the last training session. * - * @return \Generator + * @return Generator */ public function steps() : Generator { diff --git a/src/CommitteeMachine.php b/src/CommitteeMachine.php index b8cdea982..62087f794 100644 --- a/src/CommitteeMachine.php +++ b/src/CommitteeMachine.php @@ -56,7 +56,7 @@ class CommitteeMachine implements Estimator, Learner, Parallel, Persistable /** * The committee of experts. i.e. the ensemble of estimators. * - * @var list<\Rubix\ML\Learner> + * @var list */ protected array $experts; @@ -70,7 +70,7 @@ class CommitteeMachine implements Estimator, Learner, Parallel, Persistable /** * The data types that the committee is compatible with. * - * @var list<\Rubix\ML\DataType> + * @var list */ protected array $compatibility; @@ -84,7 +84,7 @@ class CommitteeMachine implements Estimator, Learner, Parallel, Persistable ]; /** - * @param \Rubix\ML\Learner[] $experts + * @param Learner[] $experts * @param (int|float)[]|null $influences * @throws InvalidArgumentException */ @@ -173,7 +173,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { @@ -208,7 +208,7 @@ public function trained() : bool /** * Return the learner instances of the committee. * - * @return list<\Rubix\ML\Learner> + * @return list */ public function experts() : array { diff --git a/src/CrossValidation/Metrics/Accuracy.php b/src/CrossValidation/Metrics/Accuracy.php index 51b9052d5..f61821777 100644 --- a/src/CrossValidation/Metrics/Accuracy.php +++ b/src/CrossValidation/Metrics/Accuracy.php @@ -37,7 +37,7 @@ public function range() : Tuple * * @internal * - * @return list<\Rubix\ML\EstimatorType> + * @return list */ public function compatibility() : array { diff --git a/src/CrossValidation/Metrics/Completeness.php b/src/CrossValidation/Metrics/Completeness.php index ad00d93bf..45e5d7486 100644 --- a/src/CrossValidation/Metrics/Completeness.php +++ b/src/CrossValidation/Metrics/Completeness.php @@ -42,7 +42,7 @@ public function range() : Tuple * * @internal * - * @return list<\Rubix\ML\EstimatorType> + * @return list */ public function compatibility() : array { diff --git a/src/CrossValidation/Metrics/FBeta.php b/src/CrossValidation/Metrics/FBeta.php index dcad00ce7..5df4d7990 100644 --- a/src/CrossValidation/Metrics/FBeta.php +++ b/src/CrossValidation/Metrics/FBeta.php @@ -92,7 +92,7 @@ public function range() : Tuple * * @internal * - * @return list<\Rubix\ML\EstimatorType> + * @return list */ public function compatibility() : array { diff --git a/src/CrossValidation/Metrics/Homogeneity.php b/src/CrossValidation/Metrics/Homogeneity.php index 04eb9fd55..622d86f04 100644 --- a/src/CrossValidation/Metrics/Homogeneity.php +++ b/src/CrossValidation/Metrics/Homogeneity.php @@ -42,7 +42,7 @@ public function range() : Tuple * * @internal * - * @return list<\Rubix\ML\EstimatorType> + * @return list */ public function compatibility() : array { diff --git a/src/CrossValidation/Metrics/Informedness.php b/src/CrossValidation/Metrics/Informedness.php index 71d9eb5c7..75db35103 100644 --- a/src/CrossValidation/Metrics/Informedness.php +++ b/src/CrossValidation/Metrics/Informedness.php @@ -56,7 +56,7 @@ public function range() : Tuple * * @internal * - * @return list<\Rubix\ML\EstimatorType> + * @return list */ public function compatibility() : array { diff --git a/src/CrossValidation/Metrics/MCC.php b/src/CrossValidation/Metrics/MCC.php index f460952bf..473962868 100644 --- a/src/CrossValidation/Metrics/MCC.php +++ b/src/CrossValidation/Metrics/MCC.php @@ -60,7 +60,7 @@ public function range() : Tuple * * @internal * - * @return list<\Rubix\ML\EstimatorType> + * @return list */ public function compatibility() : array { diff --git a/src/CrossValidation/Metrics/MeanAbsoluteError.php b/src/CrossValidation/Metrics/MeanAbsoluteError.php index 7e56151bc..8880d74de 100644 --- a/src/CrossValidation/Metrics/MeanAbsoluteError.php +++ b/src/CrossValidation/Metrics/MeanAbsoluteError.php @@ -39,7 +39,7 @@ public function range() : Tuple * * @internal * - * @return list<\Rubix\ML\EstimatorType> + * @return list */ public function compatibility() : array { diff --git a/src/CrossValidation/Metrics/MeanSquaredError.php b/src/CrossValidation/Metrics/MeanSquaredError.php index 8a732b484..f7409640e 100644 --- a/src/CrossValidation/Metrics/MeanSquaredError.php +++ b/src/CrossValidation/Metrics/MeanSquaredError.php @@ -39,7 +39,7 @@ public function range() : Tuple * * @internal * - * @return list<\Rubix\ML\EstimatorType> + * @return list */ public function compatibility() : array { diff --git a/src/CrossValidation/Metrics/MedianAbsoluteError.php b/src/CrossValidation/Metrics/MedianAbsoluteError.php index 02f233d5f..dd7d6acde 100644 --- a/src/CrossValidation/Metrics/MedianAbsoluteError.php +++ b/src/CrossValidation/Metrics/MedianAbsoluteError.php @@ -38,7 +38,7 @@ public function range() : Tuple * * @internal * - * @return list<\Rubix\ML\EstimatorType> + * @return list */ public function compatibility() : array { diff --git a/src/CrossValidation/Metrics/RSquared.php b/src/CrossValidation/Metrics/RSquared.php index db84e579c..e110ff5a1 100644 --- a/src/CrossValidation/Metrics/RSquared.php +++ b/src/CrossValidation/Metrics/RSquared.php @@ -37,7 +37,7 @@ public function range() : Tuple * * @internal * - * @return list<\Rubix\ML\EstimatorType> + * @return list */ public function compatibility() : array { diff --git a/src/CrossValidation/Metrics/RandIndex.php b/src/CrossValidation/Metrics/RandIndex.php index 7ae1b7eff..ce6d90203 100644 --- a/src/CrossValidation/Metrics/RandIndex.php +++ b/src/CrossValidation/Metrics/RandIndex.php @@ -54,7 +54,7 @@ public function range() : Tuple * * @internal * - * @return list<\Rubix\ML\EstimatorType> + * @return list */ public function compatibility() : array { diff --git a/src/CrossValidation/Metrics/SMAPE.php b/src/CrossValidation/Metrics/SMAPE.php index bcbf0d13b..79b5e7063 100644 --- a/src/CrossValidation/Metrics/SMAPE.php +++ b/src/CrossValidation/Metrics/SMAPE.php @@ -44,7 +44,7 @@ public function range() : Tuple * * @internal * - * @return list<\Rubix\ML\EstimatorType> + * @return list */ public function compatibility() : array { diff --git a/src/CrossValidation/Metrics/VMeasure.php b/src/CrossValidation/Metrics/VMeasure.php index 01c2e148f..80aa2ee2f 100644 --- a/src/CrossValidation/Metrics/VMeasure.php +++ b/src/CrossValidation/Metrics/VMeasure.php @@ -61,7 +61,7 @@ public function range() : Tuple * * @internal * - * @return list<\Rubix\ML\EstimatorType> + * @return list */ public function compatibility() : array { diff --git a/src/CrossValidation/Reports/AggregateReport.php b/src/CrossValidation/Reports/AggregateReport.php index e2c6c8a51..e57ba8032 100644 --- a/src/CrossValidation/Reports/AggregateReport.php +++ b/src/CrossValidation/Reports/AggregateReport.php @@ -22,7 +22,7 @@ class AggregateReport implements ReportGenerator * The report middleware stack. i.e. the reports to generate when the reports * method is called. * - * @var \Rubix\ML\CrossValidation\Reports\ReportGenerator[] + * @var ReportGenerator[] */ protected $reports = [ // @@ -36,7 +36,7 @@ class AggregateReport implements ReportGenerator protected $compatibility; /** - * @param \Rubix\ML\CrossValidation\Reports\ReportGenerator[] $reports + * @param ReportGenerator[] $reports * @throws InvalidArgumentException */ public function __construct(array $reports) diff --git a/src/CrossValidation/Reports/ConfusionMatrix.php b/src/CrossValidation/Reports/ConfusionMatrix.php index ec5105b71..ddf1dd4fa 100644 --- a/src/CrossValidation/Reports/ConfusionMatrix.php +++ b/src/CrossValidation/Reports/ConfusionMatrix.php @@ -28,7 +28,7 @@ class ConfusionMatrix implements ReportGenerator * * @internal * - * @return list<\Rubix\ML\EstimatorType> + * @return list */ public function compatibility() : array { diff --git a/src/CrossValidation/Reports/ContingencyTable.php b/src/CrossValidation/Reports/ContingencyTable.php index 8cbe77ccb..a6e6f9b58 100644 --- a/src/CrossValidation/Reports/ContingencyTable.php +++ b/src/CrossValidation/Reports/ContingencyTable.php @@ -28,7 +28,7 @@ class ContingencyTable implements ReportGenerator * * @internal * - * @return list<\Rubix\ML\EstimatorType> + * @return list */ public function compatibility() : array { diff --git a/src/CrossValidation/Reports/ErrorAnalysis.php b/src/CrossValidation/Reports/ErrorAnalysis.php index af15c996c..bcf9a9a36 100644 --- a/src/CrossValidation/Reports/ErrorAnalysis.php +++ b/src/CrossValidation/Reports/ErrorAnalysis.php @@ -30,7 +30,7 @@ class ErrorAnalysis implements ReportGenerator * * @internal * - * @return list<\Rubix\ML\EstimatorType> + * @return list */ public function compatibility() : array { diff --git a/src/CrossValidation/Reports/MulticlassBreakdown.php b/src/CrossValidation/Reports/MulticlassBreakdown.php index 50c4ba86f..8752ac99a 100644 --- a/src/CrossValidation/Reports/MulticlassBreakdown.php +++ b/src/CrossValidation/Reports/MulticlassBreakdown.php @@ -32,7 +32,7 @@ class MulticlassBreakdown implements ReportGenerator * * @internal * - * @return list<\Rubix\ML\EstimatorType> + * @return list */ public function compatibility() : array { diff --git a/src/Datasets/Dataset.php b/src/Datasets/Dataset.php index 408a66199..ed9d7d57b 100644 --- a/src/Datasets/Dataset.php +++ b/src/Datasets/Dataset.php @@ -103,7 +103,7 @@ abstract public static function fromIterator(iterable $iterator) : self; /** * Stack a number of datasets on top of each other to form a single dataset. * - * @param iterable<\Rubix\ML\Datasets\Dataset> $datasets + * @param iterable $datasets * @return static */ abstract public static function stack(iterable $datasets) : self; @@ -131,7 +131,7 @@ public function size() : int /** * Return the high-level data types of each column in the data table. * - * @return list<\Rubix\ML\DataType> + * @return list */ public function types() : array { @@ -267,7 +267,7 @@ public function featureType(int $offset) : DataType /** * Return an array of feature column data types autodetected using the first sample in the dataset. * - * @return list<\Rubix\ML\DataType> + * @return list */ public function featureTypes() : array { @@ -281,7 +281,7 @@ public function featureTypes() : array /** * Return the unique feature types. * - * @return list<\Rubix\ML\DataType> + * @return list */ public function uniqueTypes() : array { diff --git a/src/Datasets/Generators/Agglomerate.php b/src/Datasets/Generators/Agglomerate.php index 9adb300e3..4db8238a1 100644 --- a/src/Datasets/Generators/Agglomerate.php +++ b/src/Datasets/Generators/Agglomerate.php @@ -24,7 +24,7 @@ class Agglomerate implements Generator /** * An array of generators. * - * @var \Rubix\ML\Datasets\Generators\Generator[] + * @var Generator[] */ protected array $generators; @@ -44,7 +44,7 @@ class Agglomerate implements Generator protected int $dimensions; /** - * @param \Rubix\ML\Datasets\Generators\Generator[] $generators + * @param Generator[] $generators * @param (int|float)[]|null $weights * @throws InvalidArgumentException */ diff --git a/src/Datasets/Labeled.php b/src/Datasets/Labeled.php index 93908e988..9ce50c230 100644 --- a/src/Datasets/Labeled.php +++ b/src/Datasets/Labeled.php @@ -95,7 +95,7 @@ public static function fromIterator(iterable $iterator) : self /** * Stack a number of datasets on top of each other to form a single dataset. * - * @param iterable<\Rubix\ML\Datasets\Labeled> $datasets + * @param iterable $datasets * @throws InvalidArgumentException * @return self */ diff --git a/src/Datasets/Unlabeled.php b/src/Datasets/Unlabeled.php index 2adc928f1..678a16123 100644 --- a/src/Datasets/Unlabeled.php +++ b/src/Datasets/Unlabeled.php @@ -68,7 +68,7 @@ public static function fromIterator(iterable $iterator) : self /** * Stack a number of datasets on top of each other to form a single dataset. * - * @param iterable<\Rubix\ML\Datasets\Dataset> $datasets + * @param iterable $datasets * @throws InvalidArgumentException * @return self */ diff --git a/src/Estimator.php b/src/Estimator.php index 1572f769d..367273a73 100644 --- a/src/Estimator.php +++ b/src/Estimator.php @@ -28,7 +28,7 @@ public function type() : EstimatorType; * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array; diff --git a/src/Graph/Nodes/Ball.php b/src/Graph/Nodes/Ball.php index 8c788669b..ee6178240 100644 --- a/src/Graph/Nodes/Ball.php +++ b/src/Graph/Nodes/Ball.php @@ -44,7 +44,7 @@ class Ball implements Hypersphere, HasBinaryChildren /** * The left and right subsets of the training data. * - * @var array{\Rubix\ML\Datasets\Labeled,\Rubix\ML\Datasets\Labeled} + * @var array{Labeled,Labeled} */ protected array $subsets; @@ -93,7 +93,7 @@ public static function split(Labeled $dataset, Distance $kernel) : self /** * @param list $center * @param float $radius - * @param array{\Rubix\ML\Datasets\Labeled,\Rubix\ML\Datasets\Labeled} $subsets + * @param array{Labeled,Labeled} $subsets */ public function __construct(array $center, float $radius, array $subsets) { @@ -136,7 +136,7 @@ public function isPoint() : bool * Return the left and right subsets of the training data. * * @throws RuntimeException - * @return array{\Rubix\ML\Datasets\Labeled,\Rubix\ML\Datasets\Labeled} + * @return array{Labeled,Labeled} */ public function subsets() : array { diff --git a/src/Graph/Nodes/Box.php b/src/Graph/Nodes/Box.php index b738a1147..dc0a702ff 100644 --- a/src/Graph/Nodes/Box.php +++ b/src/Graph/Nodes/Box.php @@ -44,7 +44,7 @@ class Box implements Hypercube, HasBinaryChildren /** * The left and right subsets of the training data. * - * @var array{\Rubix\ML\Datasets\Labeled,\Rubix\ML\Datasets\Labeled} + * @var array{Labeled,Labeled} */ protected array $subsets; @@ -92,7 +92,7 @@ public static function split(Labeled $dataset) : self /** * @param int $column * @param string|int|float $value - * @param array{\Rubix\ML\Datasets\Labeled,\Rubix\ML\Datasets\Labeled} $subsets + * @param array{Labeled,Labeled} $subsets * @param list $min * @param list $max */ @@ -129,7 +129,7 @@ public function value() * Return the left and right subsets of the training data. * * @throws RuntimeException - * @return array{\Rubix\ML\Datasets\Labeled,\Rubix\ML\Datasets\Labeled} + * @return array{Labeled,Labeled} */ public function subsets() : array { diff --git a/src/Graph/Nodes/HasBinaryChildren.php b/src/Graph/Nodes/HasBinaryChildren.php index 569965f8f..c935da12b 100644 --- a/src/Graph/Nodes/HasBinaryChildren.php +++ b/src/Graph/Nodes/HasBinaryChildren.php @@ -32,7 +32,7 @@ public function right() : ?BinaryNode; /** * Return the children of this node in an iterator. * - * @return \Traversable<\Rubix\ML\Graph\Nodes\BinaryNode> + * @return Traversable */ public function children() : Traversable; diff --git a/src/Graph/Nodes/Hypercube.php b/src/Graph/Nodes/Hypercube.php index 20ad310bc..c670f635a 100644 --- a/src/Graph/Nodes/Hypercube.php +++ b/src/Graph/Nodes/Hypercube.php @@ -18,7 +18,7 @@ interface Hypercube extends Node /** * Return the minimum bounding box surrounding this node. * - * @return \Traversable> + * @return Traversable> */ public function sides() : Traversable; diff --git a/src/Graph/Nodes/Isolator.php b/src/Graph/Nodes/Isolator.php index 995832c67..76285e2ef 100644 --- a/src/Graph/Nodes/Isolator.php +++ b/src/Graph/Nodes/Isolator.php @@ -48,7 +48,7 @@ class Isolator implements HasBinaryChildren /** * The left and right subsets of the training data. * - * @var array{\Rubix\ML\Datasets\Dataset,\Rubix\ML\Datasets\Dataset} + * @var array{Dataset,Dataset} */ protected array $subsets; @@ -90,7 +90,7 @@ public static function split(Dataset $dataset) : self /** * @param int $column * @param string|int|float $value - * @param array{\Rubix\ML\Datasets\Dataset,\Rubix\ML\Datasets\Dataset} $subsets + * @param array{Dataset,Dataset} $subsets * @throws \Rubix\ML\Exceptions\InvalidArgumentException */ public function __construct(int $column, $value, array $subsets) @@ -124,7 +124,7 @@ public function value() * Return the left and right subsets of the training data. * * @throws RuntimeException - * @return array{\Rubix\ML\Datasets\Dataset,\Rubix\ML\Datasets\Dataset} + * @return array{Dataset,Dataset} */ public function subsets() : array { diff --git a/src/Graph/Nodes/Traits/HasBinaryChildrenTrait.php b/src/Graph/Nodes/Traits/HasBinaryChildrenTrait.php index 504441672..f4bfca1fa 100644 --- a/src/Graph/Nodes/Traits/HasBinaryChildrenTrait.php +++ b/src/Graph/Nodes/Traits/HasBinaryChildrenTrait.php @@ -35,7 +35,7 @@ trait HasBinaryChildrenTrait /** * Return the children of this node in a generator. * - * @return \Generator<\Rubix\ML\Graph\Nodes\BinaryNode> + * @return \Generator */ public function children() : Traversable { diff --git a/src/Graph/Nodes/VantagePoint.php b/src/Graph/Nodes/VantagePoint.php index 595108452..9cb4ca572 100644 --- a/src/Graph/Nodes/VantagePoint.php +++ b/src/Graph/Nodes/VantagePoint.php @@ -129,7 +129,7 @@ public function radius() : float * Return the left and right subsets of the training data. * * @throws RuntimeException - * @return array{\Rubix\ML\Datasets\Labeled,\Rubix\ML\Datasets\Labeled} + * @return array{Labeled,Labeled} */ public function subsets() : array { diff --git a/src/Graph/Trees/BallTree.php b/src/Graph/Trees/BallTree.php index 649ad0b55..70efb870c 100644 --- a/src/Graph/Trees/BallTree.php +++ b/src/Graph/Trees/BallTree.php @@ -301,7 +301,7 @@ public function destroy() : void * Return the path of a sample taken from the root node to a leaf node in an array. * * @param list $sample - * @return list<\Rubix\ML\Graph\Nodes\Hypersphere> + * @return list */ protected function path(array $sample) : array { diff --git a/src/Graph/Trees/DecisionTree.php b/src/Graph/Trees/DecisionTree.php index 764cb42a2..cb24c564c 100644 --- a/src/Graph/Trees/DecisionTree.php +++ b/src/Graph/Trees/DecisionTree.php @@ -303,7 +303,7 @@ public function featureImportances() : array /** * Return an iterator for all the nodes in the tree starting at the root and traversing depth first. * - * @return \Generator<\Rubix\ML\Graph\Nodes\BinaryNode> + * @return \Generator */ public function getIterator() : Traversable { @@ -377,7 +377,7 @@ abstract protected function impurity(array $labels) : float; /** * Calculate the impurity of a given split. * - * @param array{\Rubix\ML\Datasets\Labeled,\Rubix\ML\Datasets\Labeled} $subsets + * @param array{Labeled,Labeled} $subsets * @return float */ protected function splitImpurity(array $subsets) : float diff --git a/src/GridSearch.php b/src/GridSearch.php index 67140769b..60fc80b43 100644 --- a/src/GridSearch.php +++ b/src/GridSearch.php @@ -196,7 +196,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Kernels/Distance/Canberra.php b/src/Kernels/Distance/Canberra.php index a69ce6255..92aed3130 100644 --- a/src/Kernels/Distance/Canberra.php +++ b/src/Kernels/Distance/Canberra.php @@ -28,7 +28,7 @@ class Canberra implements Distance * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Kernels/Distance/Cosine.php b/src/Kernels/Distance/Cosine.php index e1a71b2bc..0635a20ce 100644 --- a/src/Kernels/Distance/Cosine.php +++ b/src/Kernels/Distance/Cosine.php @@ -27,7 +27,7 @@ class Cosine implements Distance * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Kernels/Distance/Diagonal.php b/src/Kernels/Distance/Diagonal.php index ea03044e2..ff14e79b9 100644 --- a/src/Kernels/Distance/Diagonal.php +++ b/src/Kernels/Distance/Diagonal.php @@ -22,7 +22,7 @@ class Diagonal implements Distance * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Kernels/Distance/Euclidean.php b/src/Kernels/Distance/Euclidean.php index eb478cecf..5f27dc84b 100644 --- a/src/Kernels/Distance/Euclidean.php +++ b/src/Kernels/Distance/Euclidean.php @@ -21,7 +21,7 @@ class Euclidean implements Distance * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Kernels/Distance/Gower.php b/src/Kernels/Distance/Gower.php index 3932ec4b7..741db1172 100644 --- a/src/Kernels/Distance/Gower.php +++ b/src/Kernels/Distance/Gower.php @@ -51,7 +51,7 @@ public function __construct(float $range = 1.0) /** * Return the data types that this kernel is compatible with. * - * @return \Rubix\ML\DataType[] + * @return DataType[] */ public function compatibility() : array { diff --git a/src/Kernels/Distance/Hamming.php b/src/Kernels/Distance/Hamming.php index 8756f2fea..28def1d7a 100644 --- a/src/Kernels/Distance/Hamming.php +++ b/src/Kernels/Distance/Hamming.php @@ -24,7 +24,7 @@ class Hamming implements Distance * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Kernels/Distance/Jaccard.php b/src/Kernels/Distance/Jaccard.php index 7534afb49..7a2cec004 100644 --- a/src/Kernels/Distance/Jaccard.php +++ b/src/Kernels/Distance/Jaccard.php @@ -24,7 +24,7 @@ class Jaccard implements Distance * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Kernels/Distance/Manhattan.php b/src/Kernels/Distance/Manhattan.php index 9008726ea..803cffb3d 100644 --- a/src/Kernels/Distance/Manhattan.php +++ b/src/Kernels/Distance/Manhattan.php @@ -21,7 +21,7 @@ class Manhattan implements Distance * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Kernels/Distance/Minkowski.php b/src/Kernels/Distance/Minkowski.php index 35f58f6c8..60a0f2f33 100644 --- a/src/Kernels/Distance/Minkowski.php +++ b/src/Kernels/Distance/Minkowski.php @@ -54,7 +54,7 @@ public function __construct(float $lambda = 3.0) * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Kernels/Distance/SafeEuclidean.php b/src/Kernels/Distance/SafeEuclidean.php index 84824c85b..b8bc9d009 100644 --- a/src/Kernels/Distance/SafeEuclidean.php +++ b/src/Kernels/Distance/SafeEuclidean.php @@ -30,7 +30,7 @@ class SafeEuclidean implements Distance, NaNSafe * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Kernels/Distance/SparseCosine.php b/src/Kernels/Distance/SparseCosine.php index 5ee9d5ae8..52e547c04 100644 --- a/src/Kernels/Distance/SparseCosine.php +++ b/src/Kernels/Distance/SparseCosine.php @@ -20,7 +20,7 @@ class SparseCosine implements Distance * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/NeuralNet/FeedForward.php b/src/NeuralNet/FeedForward.php index af12139d7..4849f1681 100644 --- a/src/NeuralNet/FeedForward.php +++ b/src/NeuralNet/FeedForward.php @@ -39,7 +39,7 @@ class FeedForward implements Network /** * The hidden layers of the network. * - * @var list<\Rubix\ML\NeuralNet\Layers\Hidden> + * @var list */ protected array $hidden = [ // @@ -48,7 +48,7 @@ class FeedForward implements Network /** * The pathing of the backward pass through the hidden layers. * - * @var list<\Rubix\ML\NeuralNet\Layers\Hidden> + * @var list */ protected array $backPass = [ // @@ -70,7 +70,7 @@ class FeedForward implements Network /** * @param Input $input - * @param \Rubix\ML\NeuralNet\Layers\Hidden[] $hidden + * @param Layers\Hidden[] $hidden * @param Output $output * @param Optimizer $optimizer */ @@ -100,7 +100,7 @@ public function input() : Input /** * Return an array of hidden layers indexed left to right. * - * @return list<\Rubix\ML\NeuralNet\Layers\Hidden> + * @return list */ public function hidden() : array { @@ -120,7 +120,7 @@ public function output() : Output /** * Return all the layers in the network. * - * @return \Traversable<\Rubix\ML\NeuralNet\Layers\Layer> + * @return Traversable */ public function layers() : Traversable { diff --git a/src/NeuralNet/Layers/BatchNorm.php b/src/NeuralNet/Layers/BatchNorm.php index 2fdddb8f1..421ec9607 100644 --- a/src/NeuralNet/Layers/BatchNorm.php +++ b/src/NeuralNet/Layers/BatchNorm.php @@ -299,7 +299,7 @@ public function gradient(Matrix $dOut, ColumnVector $gamma, ColumnVector $stdInv * @internal * * @throws RuntimeException - * @return \Generator<\Rubix\ML\NeuralNet\Parameter> + * @return Generator */ public function parameters() : Generator { @@ -316,7 +316,7 @@ public function parameters() : Generator * * @internal * - * @param \Rubix\ML\NeuralNet\Parameter[] $parameters + * @param Parameter[] $parameters */ public function restore(array $parameters) : void { diff --git a/src/NeuralNet/Layers/Binary.php b/src/NeuralNet/Layers/Binary.php index 0d3316b92..15de3942c 100644 --- a/src/NeuralNet/Layers/Binary.php +++ b/src/NeuralNet/Layers/Binary.php @@ -149,7 +149,7 @@ public function infer(Matrix $input) : Matrix * @param string[] $labels * @param Optimizer $optimizer * @throws RuntimeException - * @return (\Rubix\ML\Deferred|float)[] + * @return (Deferred|float)[] */ public function back(array $labels, Optimizer $optimizer) : array { diff --git a/src/NeuralNet/Layers/Continuous.php b/src/NeuralNet/Layers/Continuous.php index 8a67fb2b3..10805e09a 100644 --- a/src/NeuralNet/Layers/Continuous.php +++ b/src/NeuralNet/Layers/Continuous.php @@ -103,7 +103,7 @@ public function infer(Matrix $input) : Matrix * @param (int|float)[] $labels * @param Optimizer $optimizer * @throws RuntimeException - * @return (\Rubix\ML\Deferred|float)[] + * @return (Deferred|float)[] */ public function back(array $labels, Optimizer $optimizer) : array { diff --git a/src/NeuralNet/Layers/Dense.php b/src/NeuralNet/Layers/Dense.php index 9b84629ed..6c3afc583 100644 --- a/src/NeuralNet/Layers/Dense.php +++ b/src/NeuralNet/Layers/Dense.php @@ -285,7 +285,7 @@ public function gradient(Matrix $weights, Matrix $dOut) : Matrix * @internal * * @throws RuntimeException - * @return \Generator<\Rubix\ML\NeuralNet\Parameter> + * @return Generator */ public function parameters() : Generator { @@ -305,7 +305,7 @@ public function parameters() : Generator * * @internal * - * @param \Rubix\ML\NeuralNet\Parameter[] $parameters + * @param Parameter[] $parameters */ public function restore(array $parameters) : void { diff --git a/src/NeuralNet/Layers/Multiclass.php b/src/NeuralNet/Layers/Multiclass.php index da9119774..f7f731337 100644 --- a/src/NeuralNet/Layers/Multiclass.php +++ b/src/NeuralNet/Layers/Multiclass.php @@ -149,7 +149,7 @@ public function infer(Matrix $input) : Matrix * @param string[] $labels * @param Optimizer $optimizer * @throws RuntimeException - * @return (\Rubix\ML\Deferred|float)[] + * @return (Deferred|float)[] */ public function back(array $labels, Optimizer $optimizer) : array { diff --git a/src/NeuralNet/Layers/PReLU.php b/src/NeuralNet/Layers/PReLU.php index 874d6fadf..3a262db82 100644 --- a/src/NeuralNet/Layers/PReLU.php +++ b/src/NeuralNet/Layers/PReLU.php @@ -185,7 +185,7 @@ public function gradient($input, $dOut) : Matrix * @internal * * @throws \RuntimeException - * @return \Generator<\Rubix\ML\NeuralNet\Parameter> + * @return Generator */ public function parameters() : Generator { @@ -201,7 +201,7 @@ public function parameters() : Generator * * @internal * - * @param \Rubix\ML\NeuralNet\Parameter[] $parameters + * @param Parameter[] $parameters */ public function restore(array $parameters) : void { diff --git a/src/NeuralNet/Layers/Parametric.php b/src/NeuralNet/Layers/Parametric.php index 256cb14db..8b373cb26 100644 --- a/src/NeuralNet/Layers/Parametric.php +++ b/src/NeuralNet/Layers/Parametric.php @@ -18,7 +18,7 @@ interface Parametric /** * Return the parameters of the layer. * - * @return \Generator<\Rubix\ML\NeuralNet\Parameter> + * @return Generator<\Rubix\ML\NeuralNet\Parameter> */ public function parameters() : Generator; diff --git a/src/NeuralNet/Layers/Swish.php b/src/NeuralNet/Layers/Swish.php index 2c60805ce..9666183a8 100644 --- a/src/NeuralNet/Layers/Swish.php +++ b/src/NeuralNet/Layers/Swish.php @@ -207,7 +207,7 @@ public function gradient($input, $output, $dOut) : Matrix * @internal * * @throws \RuntimeException - * @return \Generator<\Rubix\ML\NeuralNet\Parameter> + * @return Generator */ public function parameters() : Generator { @@ -223,7 +223,7 @@ public function parameters() : Generator * * @internal * - * @param \Rubix\ML\NeuralNet\Parameter[] $parameters + * @param Parameter[] $parameters */ public function restore(array $parameters) : void { diff --git a/src/NeuralNet/Network.php b/src/NeuralNet/Network.php index f328a3148..1984c1418 100644 --- a/src/NeuralNet/Network.php +++ b/src/NeuralNet/Network.php @@ -18,7 +18,7 @@ interface Network /** * Return the layers of the network. * - * @return \Traversable<\Rubix\ML\NeuralNet\Layers\Layer> + * @return Traversable */ public function layers() : Traversable; } diff --git a/src/NeuralNet/Optimizers/AdaGrad.php b/src/NeuralNet/Optimizers/AdaGrad.php index 699a86ead..fe2421d48 100644 --- a/src/NeuralNet/Optimizers/AdaGrad.php +++ b/src/NeuralNet/Optimizers/AdaGrad.php @@ -38,7 +38,7 @@ class AdaGrad implements Optimizer, Adaptive /** * The cache of sum of squared gradients. * - * @var \Tensor\Tensor[] + * @var Tensor[] */ protected array $cache = [ // @@ -83,8 +83,8 @@ public function warm(Parameter $param) : void * @internal * * @param Parameter $param - * @param \Tensor\Tensor $gradient - * @return \Tensor\Tensor + * @param Tensor $gradient + * @return Tensor */ public function step(Parameter $param, Tensor $gradient) : Tensor { diff --git a/src/NeuralNet/Optimizers/AdaMax.php b/src/NeuralNet/Optimizers/AdaMax.php index 25d99e13f..d5dad548b 100644 --- a/src/NeuralNet/Optimizers/AdaMax.php +++ b/src/NeuralNet/Optimizers/AdaMax.php @@ -75,8 +75,8 @@ public function __construct(float $rate = 0.001, float $momentumDecay = 0.1, flo * @internal * * @param Parameter $param - * @param \Tensor\Tensor $gradient - * @return \Tensor\Tensor + * @param Tensor $gradient + * @return Tensor */ public function step(Parameter $param, Tensor $gradient) : Tensor { diff --git a/src/NeuralNet/Optimizers/Adam.php b/src/NeuralNet/Optimizers/Adam.php index a2955917f..1e7fbf9d0 100644 --- a/src/NeuralNet/Optimizers/Adam.php +++ b/src/NeuralNet/Optimizers/Adam.php @@ -54,7 +54,7 @@ class Adam implements Optimizer, Adaptive /** * The parameter cache of running velocity and squared gradients. * - * @var array<\Tensor\Tensor[]> + * @var array */ protected array $cache = [ // @@ -115,8 +115,8 @@ public function warm(Parameter $param) : void * @internal * * @param Parameter $param - * @param \Tensor\Tensor $gradient - * @return \Tensor\Tensor + * @param Tensor $gradient + * @return Tensor */ public function step(Parameter $param, Tensor $gradient) : Tensor { diff --git a/src/NeuralNet/Optimizers/Cyclical.php b/src/NeuralNet/Optimizers/Cyclical.php index 498134613..dcce49bf2 100644 --- a/src/NeuralNet/Optimizers/Cyclical.php +++ b/src/NeuralNet/Optimizers/Cyclical.php @@ -112,8 +112,8 @@ public function __construct( * @internal * * @param Parameter $param - * @param \Tensor\Tensor $gradient - * @return \Tensor\Tensor + * @param Tensor $gradient + * @return Tensor */ public function step(Parameter $param, Tensor $gradient) : Tensor { diff --git a/src/NeuralNet/Optimizers/Momentum.php b/src/NeuralNet/Optimizers/Momentum.php index 84526727f..dac39e841 100644 --- a/src/NeuralNet/Optimizers/Momentum.php +++ b/src/NeuralNet/Optimizers/Momentum.php @@ -50,7 +50,7 @@ class Momentum implements Optimizer, Adaptive /** * The parameter cache of velocity matrices. * - * @var \Tensor\Tensor[] + * @var Tensor[] */ protected array $cache = [ // @@ -104,8 +104,8 @@ public function warm(Parameter $param) : void * @internal * * @param Parameter $param - * @param \Tensor\Tensor $gradient - * @return \Tensor\Tensor + * @param Tensor $gradient + * @return Tensor */ public function step(Parameter $param, Tensor $gradient) : Tensor { diff --git a/src/NeuralNet/Optimizers/Optimizer.php b/src/NeuralNet/Optimizers/Optimizer.php index ab80c14d3..d96ea4fa2 100644 --- a/src/NeuralNet/Optimizers/Optimizer.php +++ b/src/NeuralNet/Optimizers/Optimizer.php @@ -21,8 +21,8 @@ interface Optimizer extends Stringable * @internal * * @param Parameter $param - * @param \Tensor\Tensor $gradient - * @return \Tensor\Tensor + * @param Tensor $gradient + * @return Tensor */ public function step(Parameter $param, Tensor $gradient) : Tensor; } diff --git a/src/NeuralNet/Optimizers/RMSProp.php b/src/NeuralNet/Optimizers/RMSProp.php index 66a05d147..be24b213b 100644 --- a/src/NeuralNet/Optimizers/RMSProp.php +++ b/src/NeuralNet/Optimizers/RMSProp.php @@ -51,7 +51,7 @@ class RMSProp implements Optimizer, Adaptive /** * The cache of running squared gradients. * - * @var \Tensor\Tensor[] + * @var Tensor[] */ protected array $cache = [ // @@ -104,8 +104,8 @@ public function warm(Parameter $param) : void * @internal * * @param Parameter $param - * @param \Tensor\Tensor $gradient - * @return \Tensor\Tensor + * @param Tensor $gradient + * @return Tensor */ public function step(Parameter $param, Tensor $gradient) : Tensor { diff --git a/src/NeuralNet/Optimizers/StepDecay.php b/src/NeuralNet/Optimizers/StepDecay.php index 8db70defe..782f94002 100644 --- a/src/NeuralNet/Optimizers/StepDecay.php +++ b/src/NeuralNet/Optimizers/StepDecay.php @@ -81,8 +81,8 @@ public function __construct(float $rate = 0.01, int $losses = 100, float $decay * @internal * * @param Parameter $param - * @param \Tensor\Tensor $gradient - * @return \Tensor\Tensor + * @param Tensor $gradient + * @return Tensor */ public function step(Parameter $param, Tensor $gradient) : Tensor { diff --git a/src/NeuralNet/Optimizers/Stochastic.php b/src/NeuralNet/Optimizers/Stochastic.php index 929d7a885..0e1151b0a 100644 --- a/src/NeuralNet/Optimizers/Stochastic.php +++ b/src/NeuralNet/Optimizers/Stochastic.php @@ -44,8 +44,8 @@ public function __construct(float $rate = 0.01) * @internal * * @param Parameter $param - * @param \Tensor\Tensor $gradient - * @return \Tensor\Tensor + * @param Tensor $gradient + * @return Tensor */ public function step(Parameter $param, Tensor $gradient) : Tensor { diff --git a/src/NeuralNet/Snapshot.php b/src/NeuralNet/Snapshot.php index 552438271..b259b9158 100644 --- a/src/NeuralNet/Snapshot.php +++ b/src/NeuralNet/Snapshot.php @@ -21,14 +21,14 @@ class Snapshot /** * The parametric layers of the network. * - * @var \Rubix\ML\NeuralNet\Layers\Parametric[] + * @var Parametric[] */ protected array $layers; /** * The parameters corresponding to each layer in the network at the time of the snapshot. * - * @var list<\Rubix\ML\NeuralNet\Parameter[]> + * @var list */ protected array $parameters; @@ -56,8 +56,8 @@ public static function take(Network $network) : self } /** - * @param \Rubix\ML\NeuralNet\Layers\Parametric[] $layers - * @param list<\Rubix\ML\NeuralNet\Parameter[]> $parameters + * @param Parametric[] $layers + * @param list $parameters * @throws InvalidArgumentException */ public function __construct(array $layers, array $parameters) diff --git a/src/PersistentModel.php b/src/PersistentModel.php index b8b60269f..11aa26ca0 100644 --- a/src/PersistentModel.php +++ b/src/PersistentModel.php @@ -101,7 +101,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Pipeline.php b/src/Pipeline.php index 53b79c8ec..39cb89efb 100644 --- a/src/Pipeline.php +++ b/src/Pipeline.php @@ -32,7 +32,7 @@ class Pipeline implements Online, Probabilistic, Scoring, Persistable, Estimator /** * A list of transformers to be applied in series. * - * @var list<\Rubix\ML\Transformers\Transformer> + * @var list */ protected array $transformers = [ // @@ -53,7 +53,7 @@ class Pipeline implements Online, Probabilistic, Scoring, Persistable, Estimator protected bool $elastic; /** - * @param \Rubix\ML\Transformers\Transformer[] $transformers + * @param Transformer[] $transformers * @param Estimator $base * @param bool $elastic * @throws InvalidArgumentException @@ -89,7 +89,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Regressors/Adaline.php b/src/Regressors/Adaline.php index fcaf06458..40ea47fb8 100644 --- a/src/Regressors/Adaline.php +++ b/src/Regressors/Adaline.php @@ -190,7 +190,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { @@ -232,7 +232,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 { diff --git a/src/Regressors/ExtraTreeRegressor.php b/src/Regressors/ExtraTreeRegressor.php index 03ac2eca0..01cd9f020 100644 --- a/src/Regressors/ExtraTreeRegressor.php +++ b/src/Regressors/ExtraTreeRegressor.php @@ -74,7 +74,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Regressors/GradientBoost.php b/src/Regressors/GradientBoost.php index 0c9ff95c3..480df0be5 100644 --- a/src/Regressors/GradientBoost.php +++ b/src/Regressors/GradientBoost.php @@ -302,7 +302,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 { diff --git a/src/Regressors/MLPRegressor.php b/src/Regressors/MLPRegressor.php index a9df840d9..56a82cb66 100644 --- a/src/Regressors/MLPRegressor.php +++ b/src/Regressors/MLPRegressor.php @@ -66,7 +66,7 @@ class MLPRegressor implements Estimator, Learner, Online, Verbose, Persistable /** * An array composing the user-specified hidden layers of the network in order. * - * @var \Rubix\ML\NeuralNet\Layers\Hidden[] + * @var Hidden[] */ protected array $hiddenLayers = [ // @@ -157,7 +157,7 @@ class MLPRegressor implements Estimator, Learner, Online, Verbose, Persistable protected ?array $losses = null; /** - * @param \Rubix\ML\NeuralNet\Layers\Hidden[] $hiddenLayers + * @param Hidden[] $hiddenLayers * @param int $batchSize * @param Optimizer|null $optimizer * @param float $l2Penalty @@ -251,7 +251,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { @@ -296,7 +296,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 { diff --git a/src/Regressors/RegressionTree.php b/src/Regressors/RegressionTree.php index f5070a44e..3e2acfa57 100644 --- a/src/Regressors/RegressionTree.php +++ b/src/Regressors/RegressionTree.php @@ -76,7 +76,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Regressors/Ridge.php b/src/Regressors/Ridge.php index de3c5944a..6bd96fb97 100644 --- a/src/Regressors/Ridge.php +++ b/src/Regressors/Ridge.php @@ -91,7 +91,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Regressors/SVR.php b/src/Regressors/SVR.php index 1d5e8bc24..4543b5ece 100644 --- a/src/Regressors/SVR.php +++ b/src/Regressors/SVR.php @@ -154,7 +154,7 @@ public function type() : EstimatorType * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Specifications/SpecificationChain.php b/src/Specifications/SpecificationChain.php index 873cf6c6e..c35eec517 100644 --- a/src/Specifications/SpecificationChain.php +++ b/src/Specifications/SpecificationChain.php @@ -10,14 +10,14 @@ class SpecificationChain extends Specification /** * A list of specifications to check in order. * - * @var iterable<\Rubix\ML\Specifications\Specification> + * @var iterable */ protected iterable $specifications; /** * Build a specification object with the given arguments. * - * @param iterable<\Rubix\ML\Specifications\Specification> $specifications + * @param iterable $specifications * @return self */ public static function with(iterable $specifications) : self @@ -26,7 +26,7 @@ public static function with(iterable $specifications) : self } /** - * @param iterable<\Rubix\ML\Specifications\Specification> $specifications + * @param iterable $specifications * @throws \Rubix\ML\Exceptions\InvalidArgumentException */ public function __construct(iterable $specifications) diff --git a/src/Transformers/BM25Transformer.php b/src/Transformers/BM25Transformer.php index fa552b013..fd8172e58 100644 --- a/src/Transformers/BM25Transformer.php +++ b/src/Transformers/BM25Transformer.php @@ -109,7 +109,7 @@ public function __construct(float $dampening = 1.2, float $normalization = 0.75) /** * Return the data types that this transformer is compatible with. * - * @return \Rubix\ML\DataType[] + * @return DataType[] */ public function compatibility() : array { diff --git a/src/Transformers/BooleanConverter.php b/src/Transformers/BooleanConverter.php index 6f12f8073..7681b244b 100644 --- a/src/Transformers/BooleanConverter.php +++ b/src/Transformers/BooleanConverter.php @@ -60,7 +60,7 @@ public function __construct($trueValue = 'true', $falseValue = 'false') * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/GaussianRandomProjector.php b/src/Transformers/GaussianRandomProjector.php index 30b3a1133..a61ae19d8 100644 --- a/src/Transformers/GaussianRandomProjector.php +++ b/src/Transformers/GaussianRandomProjector.php @@ -88,7 +88,7 @@ public function __construct(int $dimensions) * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/HotDeckImputer.php b/src/Transformers/HotDeckImputer.php index fcaaafdd2..1e0a06c6f 100644 --- a/src/Transformers/HotDeckImputer.php +++ b/src/Transformers/HotDeckImputer.php @@ -117,7 +117,7 @@ public function __construct( * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/ImageResizer.php b/src/Transformers/ImageResizer.php index a97694491..15605654c 100644 --- a/src/Transformers/ImageResizer.php +++ b/src/Transformers/ImageResizer.php @@ -65,7 +65,7 @@ public function __construct(int $width = 32, int $height = 32) * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/ImageRotator.php b/src/Transformers/ImageRotator.php index ff261d186..20afaaa8f 100644 --- a/src/Transformers/ImageRotator.php +++ b/src/Transformers/ImageRotator.php @@ -72,7 +72,7 @@ public function __construct(float $offset, float $jitter = 0.0) * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/ImageVectorizer.php b/src/Transformers/ImageVectorizer.php index 9a130a7a6..d636c0452 100644 --- a/src/Transformers/ImageVectorizer.php +++ b/src/Transformers/ImageVectorizer.php @@ -55,7 +55,7 @@ public function __construct(bool $grayscale = false) * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/IntervalDiscretizer.php b/src/Transformers/IntervalDiscretizer.php index 2619cc96d..c060b9017 100644 --- a/src/Transformers/IntervalDiscretizer.php +++ b/src/Transformers/IntervalDiscretizer.php @@ -72,7 +72,7 @@ public function __construct(int $bins = 5, bool $equiWidth = false) * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/KNNImputer.php b/src/Transformers/KNNImputer.php index 971ba7d3e..c3e0c2009 100644 --- a/src/Transformers/KNNImputer.php +++ b/src/Transformers/KNNImputer.php @@ -78,7 +78,7 @@ class KNNImputer implements Transformer, Stateful, Persistable /** * The data types of the fitted feature columns. * - * @var \Rubix\ML\DataType[]|null + * @var DataType[]|null */ protected ?array $types = null; @@ -124,7 +124,7 @@ public function __construct( * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/L1Normalizer.php b/src/Transformers/L1Normalizer.php index cd90757a5..1c2c8cdb5 100644 --- a/src/Transformers/L1Normalizer.php +++ b/src/Transformers/L1Normalizer.php @@ -26,7 +26,7 @@ class L1Normalizer implements Transformer * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/L2Normalizer.php b/src/Transformers/L2Normalizer.php index fcdc501c5..3aa0790d3 100644 --- a/src/Transformers/L2Normalizer.php +++ b/src/Transformers/L2Normalizer.php @@ -25,7 +25,7 @@ class L2Normalizer implements Transformer * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/LambdaFunction.php b/src/Transformers/LambdaFunction.php index 5c69a9451..24a9b8125 100644 --- a/src/Transformers/LambdaFunction.php +++ b/src/Transformers/LambdaFunction.php @@ -45,7 +45,7 @@ public function __construct(callable $callback, $context = null) /** * Return the data types that this transformer is compatible with. * - * @return \Rubix\ML\DataType[] + * @return DataType[] */ public function compatibility() : array { diff --git a/src/Transformers/LinearDiscriminantAnalysis.php b/src/Transformers/LinearDiscriminantAnalysis.php index 0eb56dc85..7e648ed3a 100644 --- a/src/Transformers/LinearDiscriminantAnalysis.php +++ b/src/Transformers/LinearDiscriminantAnalysis.php @@ -82,7 +82,7 @@ public function __construct(int $dimensions) * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/MaxAbsoluteScaler.php b/src/Transformers/MaxAbsoluteScaler.php index dfb3fab05..60f8ebe08 100644 --- a/src/Transformers/MaxAbsoluteScaler.php +++ b/src/Transformers/MaxAbsoluteScaler.php @@ -37,7 +37,7 @@ class MaxAbsoluteScaler implements Transformer, Stateful, Elastic, Reversible, P * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/MinMaxNormalizer.php b/src/Transformers/MinMaxNormalizer.php index 3bf741ec4..8077466f2 100644 --- a/src/Transformers/MinMaxNormalizer.php +++ b/src/Transformers/MinMaxNormalizer.php @@ -85,7 +85,7 @@ public function __construct(float $min = 0.0, float $max = 1.0) * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/MissingDataImputer.php b/src/Transformers/MissingDataImputer.php index cb4304a52..2eec9c147 100644 --- a/src/Transformers/MissingDataImputer.php +++ b/src/Transformers/MissingDataImputer.php @@ -53,14 +53,14 @@ class MissingDataImputer implements Transformer, Stateful, Persistable /** * The fitted guessing strategy for each feature column. * - * @var list<\Rubix\ML\Strategies\Strategy>|null + * @var list|null */ protected ?array $strategies = null; /** * The data types of the fitted feature columns. * - * @var list<\Rubix\ML\DataType>|null + * @var list|null */ protected ?array $types = null; @@ -95,7 +95,7 @@ public function __construct( * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/MultibyteTextNormalizer.php b/src/Transformers/MultibyteTextNormalizer.php index ec3bad052..f391bbb1d 100644 --- a/src/Transformers/MultibyteTextNormalizer.php +++ b/src/Transformers/MultibyteTextNormalizer.php @@ -43,7 +43,7 @@ public function __construct(bool $uppercase = false) * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/NumericStringConverter.php b/src/Transformers/NumericStringConverter.php index f253977af..d2189bc53 100644 --- a/src/Transformers/NumericStringConverter.php +++ b/src/Transformers/NumericStringConverter.php @@ -25,7 +25,7 @@ class NumericStringConverter implements Transformer, Reversible * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/OneHotEncoder.php b/src/Transformers/OneHotEncoder.php index 5634cf58d..897d07d99 100644 --- a/src/Transformers/OneHotEncoder.php +++ b/src/Transformers/OneHotEncoder.php @@ -35,32 +35,33 @@ class OneHotEncoder implements Transformer, Stateful, Persistable use AutotrackRevisions; /** - * The set of unique possible categories per feature column of the training set. + * The categories that should be ignored. * - * @var array|null + * @var array */ - protected ?array $categories = null; + protected array $excluded = []; /** - * The categories that should be ignored + * The set of unique possible categories per feature column of the training set. * - * @var array + * @var array|null */ - protected array $drop = []; + protected ?array $categories = null; /** - * @param string|array $drop The categories to drop during encoding + * @param list $excluded The categories to drop during encoding. */ - public function __construct($drop = []) + public function __construct(array $excluded = []) { - $this->drop = is_array($drop) ? $drop : [$drop]; + $this->excluded = $excluded; } /** * Return the data types that this transformer is compatible with. * - * @return list<\Rubix\ML\DataType> * @internal + * + * @return list */ public function compatibility() : array { @@ -102,7 +103,7 @@ public function fit(Dataset $dataset) : void if ($type->isCategorical()) { $values = $dataset->feature($column); - $values = array_diff($values, $this->drop); + $values = array_diff($values, $this->excluded); $categories = array_values(array_unique($values)); diff --git a/src/Transformers/PolynomialExpander.php b/src/Transformers/PolynomialExpander.php index c0ccb056c..646337a60 100644 --- a/src/Transformers/PolynomialExpander.php +++ b/src/Transformers/PolynomialExpander.php @@ -44,7 +44,7 @@ public function __construct(int $degree = 2) * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/PrincipalComponentAnalysis.php b/src/Transformers/PrincipalComponentAnalysis.php index ac9b99f57..13e2379f1 100644 --- a/src/Transformers/PrincipalComponentAnalysis.php +++ b/src/Transformers/PrincipalComponentAnalysis.php @@ -93,7 +93,7 @@ public function __construct(int $dimensions) * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/RegexFilter.php b/src/Transformers/RegexFilter.php index 99122d014..cbcfdf451 100644 --- a/src/Transformers/RegexFilter.php +++ b/src/Transformers/RegexFilter.php @@ -124,7 +124,7 @@ public function __construct(array $patterns) * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/RobustStandardizer.php b/src/Transformers/RobustStandardizer.php index b535f3c16..cada404d5 100644 --- a/src/Transformers/RobustStandardizer.php +++ b/src/Transformers/RobustStandardizer.php @@ -65,7 +65,7 @@ public function __construct(bool $center = true) * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/TSNE.php b/src/Transformers/TSNE.php index dcf99e15b..d6b81b16d 100644 --- a/src/Transformers/TSNE.php +++ b/src/Transformers/TSNE.php @@ -286,7 +286,7 @@ public function compatibility() : array /** * Return an iterable progress table with the steps from the last training session. * - * @return \Generator + * @return Generator */ public function steps() : Generator { diff --git a/src/Transformers/TextNormalizer.php b/src/Transformers/TextNormalizer.php index 6c3f8ac30..c659e6096 100644 --- a/src/Transformers/TextNormalizer.php +++ b/src/Transformers/TextNormalizer.php @@ -39,7 +39,7 @@ public function __construct(bool $uppercase = false) * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/TfIdfTransformer.php b/src/Transformers/TfIdfTransformer.php index 531e9a8f6..c25ec57c9 100644 --- a/src/Transformers/TfIdfTransformer.php +++ b/src/Transformers/TfIdfTransformer.php @@ -95,7 +95,7 @@ public function __construct(float $smoothing = 1.0, bool $dampening = false) * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/TokenHashingVectorizer.php b/src/Transformers/TokenHashingVectorizer.php index 3c994bc24..f3a2584d6 100644 --- a/src/Transformers/TokenHashingVectorizer.php +++ b/src/Transformers/TokenHashingVectorizer.php @@ -123,7 +123,7 @@ public function __construct(int $dimensions, ?Tokenizer $tokenizer = null, ?call /** * Return the data types that this transformer is compatible with. * - * @return \Rubix\ML\DataType[] + * @return DataType[] */ public function compatibility() : array { diff --git a/src/Transformers/TruncatedSVD.php b/src/Transformers/TruncatedSVD.php index 345679213..076e1c016 100644 --- a/src/Transformers/TruncatedSVD.php +++ b/src/Transformers/TruncatedSVD.php @@ -82,7 +82,7 @@ public function __construct(int $dimensions) * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/WordCountVectorizer.php b/src/Transformers/WordCountVectorizer.php index 74b335b3b..b6329cfff 100644 --- a/src/Transformers/WordCountVectorizer.php +++ b/src/Transformers/WordCountVectorizer.php @@ -109,7 +109,7 @@ public function __construct( * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/Transformers/ZScaleStandardizer.php b/src/Transformers/ZScaleStandardizer.php index 5425bb7b2..39886a8be 100644 --- a/src/Transformers/ZScaleStandardizer.php +++ b/src/Transformers/ZScaleStandardizer.php @@ -77,7 +77,7 @@ public function __construct(bool $center = true) * * @internal * - * @return list<\Rubix\ML\DataType> + * @return list */ public function compatibility() : array { diff --git a/src/constants.php b/src/constants.php index 5dda0d669..76392f1c7 100644 --- a/src/constants.php +++ b/src/constants.php @@ -9,7 +9,7 @@ * * @var literal-string */ - const VERSION = '2.5'; + const VERSION = '2.6'; /** * A very small positive number, sometimes used in substitution of 0. diff --git a/tests/CrossValidation/Metrics/AccuracyTest.php b/tests/CrossValidation/Metrics/AccuracyTest.php index b9cc508b1..ecccd3eb4 100644 --- a/tests/CrossValidation/Metrics/AccuracyTest.php +++ b/tests/CrossValidation/Metrics/AccuracyTest.php @@ -88,7 +88,7 @@ public function score(array $predictions, array $labels, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function scoreProvider() : Generator { diff --git a/tests/CrossValidation/Metrics/BrierScoreTest.php b/tests/CrossValidation/Metrics/BrierScoreTest.php index 701f38ba7..5c8b0c72f 100644 --- a/tests/CrossValidation/Metrics/BrierScoreTest.php +++ b/tests/CrossValidation/Metrics/BrierScoreTest.php @@ -74,7 +74,7 @@ public function score(array $probabilities, array $labels, float $expected) : vo } /** - * @return \Generator + * @return Generator */ public function scoreProvider() : Generator { diff --git a/tests/CrossValidation/Metrics/CompletenessTest.php b/tests/CrossValidation/Metrics/CompletenessTest.php index 873b943f9..7beaaef12 100644 --- a/tests/CrossValidation/Metrics/CompletenessTest.php +++ b/tests/CrossValidation/Metrics/CompletenessTest.php @@ -87,7 +87,7 @@ public function score(array $predictions, array $labels, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function scoreProvider() : Generator { diff --git a/tests/CrossValidation/Metrics/FBetaTest.php b/tests/CrossValidation/Metrics/FBetaTest.php index 57dd2fca5..d16f33dcd 100644 --- a/tests/CrossValidation/Metrics/FBetaTest.php +++ b/tests/CrossValidation/Metrics/FBetaTest.php @@ -88,7 +88,7 @@ public function score(array $predictions, array $labels, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function scoreProvider() : Generator { diff --git a/tests/CrossValidation/Metrics/HomogeneityTest.php b/tests/CrossValidation/Metrics/HomogeneityTest.php index 47b05d595..05bf689d3 100644 --- a/tests/CrossValidation/Metrics/HomogeneityTest.php +++ b/tests/CrossValidation/Metrics/HomogeneityTest.php @@ -87,7 +87,7 @@ public function score(array $predictions, array $labels, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function scoreProvider() : Generator { diff --git a/tests/CrossValidation/Metrics/InformednessTest.php b/tests/CrossValidation/Metrics/InformednessTest.php index aa1f276b6..bb19d5ccd 100644 --- a/tests/CrossValidation/Metrics/InformednessTest.php +++ b/tests/CrossValidation/Metrics/InformednessTest.php @@ -88,7 +88,7 @@ public function score(array $predictions, array $labels, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function scoreProvider() : Generator { diff --git a/tests/CrossValidation/Metrics/MCCTest.php b/tests/CrossValidation/Metrics/MCCTest.php index 22325cc5f..fb1b095b4 100644 --- a/tests/CrossValidation/Metrics/MCCTest.php +++ b/tests/CrossValidation/Metrics/MCCTest.php @@ -88,7 +88,7 @@ public function score(array $predictions, array $labels, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function scoreProvider() : Generator { diff --git a/tests/CrossValidation/Metrics/MeanAbsoluteErrorTest.php b/tests/CrossValidation/Metrics/MeanAbsoluteErrorTest.php index fd30236a8..7c2fb5ab4 100644 --- a/tests/CrossValidation/Metrics/MeanAbsoluteErrorTest.php +++ b/tests/CrossValidation/Metrics/MeanAbsoluteErrorTest.php @@ -87,7 +87,7 @@ public function score(array $predictions, array $labels, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function scoreProvider() : Generator { diff --git a/tests/CrossValidation/Metrics/MeanSquaredErrorTest.php b/tests/CrossValidation/Metrics/MeanSquaredErrorTest.php index e0008cd58..559dd43b2 100644 --- a/tests/CrossValidation/Metrics/MeanSquaredErrorTest.php +++ b/tests/CrossValidation/Metrics/MeanSquaredErrorTest.php @@ -87,7 +87,7 @@ public function score(array $predictions, array $labels, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function scoreProvider() : Generator { diff --git a/tests/CrossValidation/Metrics/MedianAbsoluteErrorTest.php b/tests/CrossValidation/Metrics/MedianAbsoluteErrorTest.php index 212f5ca83..ec5f6bb16 100644 --- a/tests/CrossValidation/Metrics/MedianAbsoluteErrorTest.php +++ b/tests/CrossValidation/Metrics/MedianAbsoluteErrorTest.php @@ -87,7 +87,7 @@ public function score(array $predictions, array $labels, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function scoreProvider() : Generator { diff --git a/tests/CrossValidation/Metrics/ProbabilisticAccuracyTest.php b/tests/CrossValidation/Metrics/ProbabilisticAccuracyTest.php index 7d77c19d5..6d1da3ae1 100644 --- a/tests/CrossValidation/Metrics/ProbabilisticAccuracyTest.php +++ b/tests/CrossValidation/Metrics/ProbabilisticAccuracyTest.php @@ -74,7 +74,7 @@ public function score(array $probabilities, array $labels, float $expected) : vo } /** - * @return \Generator + * @return Generator */ public function scoreProvider() : Generator { diff --git a/tests/CrossValidation/Metrics/RMSETest.php b/tests/CrossValidation/Metrics/RMSETest.php index b240d7328..465e2ed3e 100644 --- a/tests/CrossValidation/Metrics/RMSETest.php +++ b/tests/CrossValidation/Metrics/RMSETest.php @@ -87,7 +87,7 @@ public function score(array $predictions, array $labels, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function scoreProvider() : Generator { diff --git a/tests/CrossValidation/Metrics/RSquaredTest.php b/tests/CrossValidation/Metrics/RSquaredTest.php index ed7fbf62f..af35c2149 100644 --- a/tests/CrossValidation/Metrics/RSquaredTest.php +++ b/tests/CrossValidation/Metrics/RSquaredTest.php @@ -87,7 +87,7 @@ public function score(array $predictions, array $labels, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function scoreProvider() : Generator { diff --git a/tests/CrossValidation/Metrics/RandIndexTest.php b/tests/CrossValidation/Metrics/RandIndexTest.php index 1f5dce31e..9f246ec46 100644 --- a/tests/CrossValidation/Metrics/RandIndexTest.php +++ b/tests/CrossValidation/Metrics/RandIndexTest.php @@ -87,7 +87,7 @@ public function score(array $predictions, array $labels, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function scoreProvider() : Generator { diff --git a/tests/CrossValidation/Metrics/SMAPETest.php b/tests/CrossValidation/Metrics/SMAPETest.php index 9e22c30c2..08961de25 100644 --- a/tests/CrossValidation/Metrics/SMAPETest.php +++ b/tests/CrossValidation/Metrics/SMAPETest.php @@ -87,7 +87,7 @@ public function score(array $predictions, array $labels, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function scoreProvider() : Generator { diff --git a/tests/CrossValidation/Metrics/TopKAccuracyTest.php b/tests/CrossValidation/Metrics/TopKAccuracyTest.php index 416765f29..276849675 100644 --- a/tests/CrossValidation/Metrics/TopKAccuracyTest.php +++ b/tests/CrossValidation/Metrics/TopKAccuracyTest.php @@ -74,7 +74,7 @@ public function score(array $probabilities, array $labels, float $expected) : vo } /** - * @return \Generator + * @return Generator */ public function scoreProvider() : Generator { diff --git a/tests/CrossValidation/Metrics/VMeasureTest.php b/tests/CrossValidation/Metrics/VMeasureTest.php index 10d0a09fe..7ac485e9d 100644 --- a/tests/CrossValidation/Metrics/VMeasureTest.php +++ b/tests/CrossValidation/Metrics/VMeasureTest.php @@ -87,7 +87,7 @@ public function score(array $predictions, array $labels, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function scoreProvider() : Generator { diff --git a/tests/CrossValidation/Reports/ConfusionMatrixTest.php b/tests/CrossValidation/Reports/ConfusionMatrixTest.php index 05c10452e..d5dc37c02 100644 --- a/tests/CrossValidation/Reports/ConfusionMatrixTest.php +++ b/tests/CrossValidation/Reports/ConfusionMatrixTest.php @@ -67,7 +67,7 @@ public function generate(array $predictions, array $labels, array $expected) : v } /** - * @return \Generator + * @return Generator */ public function generateProvider() : Generator { diff --git a/tests/CrossValidation/Reports/ContingencyTableTest.php b/tests/CrossValidation/Reports/ContingencyTableTest.php index 95c61bd21..68ca0e04e 100644 --- a/tests/CrossValidation/Reports/ContingencyTableTest.php +++ b/tests/CrossValidation/Reports/ContingencyTableTest.php @@ -66,7 +66,7 @@ public function generate(array $predictions, array $labels, array $expected) : v } /** - * @return \Generator + * @return Generator */ public function generateProvider() : Generator { diff --git a/tests/CrossValidation/Reports/ErrorAnalysisTest.php b/tests/CrossValidation/Reports/ErrorAnalysisTest.php index ae91b0b06..94c6f2814 100644 --- a/tests/CrossValidation/Reports/ErrorAnalysisTest.php +++ b/tests/CrossValidation/Reports/ErrorAnalysisTest.php @@ -66,7 +66,7 @@ public function generate(array $predictions, array $labels, array $expected) : v } /** - * @return \Generator + * @return Generator */ public function generateProvider() : Generator { diff --git a/tests/CrossValidation/Reports/MulticlassBreakdownTest.php b/tests/CrossValidation/Reports/MulticlassBreakdownTest.php index 85608b04f..f6446bd3a 100644 --- a/tests/CrossValidation/Reports/MulticlassBreakdownTest.php +++ b/tests/CrossValidation/Reports/MulticlassBreakdownTest.php @@ -67,7 +67,7 @@ public function generate(array $predictions, array $labels, array $expected) : v } /** - * @return \Generator + * @return Generator */ public function generateProvider() : Generator { diff --git a/tests/DataTypeTest.php b/tests/DataTypeTest.php index 88c397a79..6db3ba6b9 100644 --- a/tests/DataTypeTest.php +++ b/tests/DataTypeTest.php @@ -25,7 +25,7 @@ public function determine($value, DataType $expected) : void } /** - * @return \Generator + * @return Generator */ public function determineProvider() : Generator { @@ -70,7 +70,7 @@ public function code(DataType $type, int $expected) : void } /** - * @return \Generator + * @return Generator */ public function codeProvider() : Generator { diff --git a/tests/FunctionsTest.php b/tests/FunctionsTest.php index 265da86d3..7613380b1 100644 --- a/tests/FunctionsTest.php +++ b/tests/FunctionsTest.php @@ -66,7 +66,7 @@ public function argmax(array $input, $expected) : void } /** - * @return \Generator + * @return Generator */ public function argmaxProvider() : Generator { @@ -119,7 +119,7 @@ public function sigmoid(float $value, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function sigmoidProvider() : Generator { @@ -146,7 +146,7 @@ public function comb(int $n, int $k, int $expected) : void } /** - * @return \Generator + * @return Generator */ public function combProvider() : Generator { @@ -174,7 +174,7 @@ public function linspace(float $min, float $max, int $n, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function linspaceProvider() : Generator { @@ -201,7 +201,7 @@ public function arrayTranspose(array $table, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function arrayTransposeProvider() : Generator { @@ -290,7 +290,7 @@ public function iteratorContainsNan(array $values, bool $expected) : void } /** - * @return \Generator + * @return Generator */ public function iteratorContainsNanProvider() : Generator { diff --git a/tests/Helpers/ParamsTest.php b/tests/Helpers/ParamsTest.php index fac97d7e6..f40df178e 100644 --- a/tests/Helpers/ParamsTest.php +++ b/tests/Helpers/ParamsTest.php @@ -81,7 +81,7 @@ public function stringify(array $params, string $separator, string $expected) : } /** - * @return \Generator + * @return Generator */ public function stringifyProvider() : Generator { diff --git a/tests/Helpers/StatsTest.php b/tests/Helpers/StatsTest.php index b42d634f8..90f4bdce5 100644 --- a/tests/Helpers/StatsTest.php +++ b/tests/Helpers/StatsTest.php @@ -27,7 +27,7 @@ public function mean(array $values, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function meanProvider() : Generator { @@ -50,7 +50,7 @@ public function weightedMean(array $values, array $weights, float $expected) : v } /** - * @return \Generator + * @return Generator */ public function weightedMeanProvider() : Generator { @@ -89,7 +89,7 @@ public function quantile(array $values, float $q, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function quantileProvider() : Generator { @@ -130,7 +130,7 @@ public function centralMoment(array $values, int $moment, float $expected) : voi } /** - * @return \Generator + * @return Generator */ public function centralMomentProvider() : Generator { diff --git a/tests/Kernels/Distance/CanberraTest.php b/tests/Kernels/Distance/CanberraTest.php index abc0f2b25..a4738fbdc 100644 --- a/tests/Kernels/Distance/CanberraTest.php +++ b/tests/Kernels/Distance/CanberraTest.php @@ -52,7 +52,7 @@ public function compute(array $a, array $b, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { diff --git a/tests/Kernels/Distance/CosineTest.php b/tests/Kernels/Distance/CosineTest.php index 6f7cc220b..e35c03c43 100644 --- a/tests/Kernels/Distance/CosineTest.php +++ b/tests/Kernels/Distance/CosineTest.php @@ -52,7 +52,7 @@ public function compute(array $a, array $b, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { diff --git a/tests/Kernels/Distance/DiagonalTest.php b/tests/Kernels/Distance/DiagonalTest.php index 9e9e8a248..d43e9664e 100644 --- a/tests/Kernels/Distance/DiagonalTest.php +++ b/tests/Kernels/Distance/DiagonalTest.php @@ -52,7 +52,7 @@ public function compute(array $a, array $b, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { diff --git a/tests/Kernels/Distance/EuclideanTest.php b/tests/Kernels/Distance/EuclideanTest.php index f383bcb10..94fd5985f 100644 --- a/tests/Kernels/Distance/EuclideanTest.php +++ b/tests/Kernels/Distance/EuclideanTest.php @@ -52,7 +52,7 @@ public function compute(array $a, array $b, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { diff --git a/tests/Kernels/Distance/GowerTest.php b/tests/Kernels/Distance/GowerTest.php index 788c6fdf7..0f4a88564 100644 --- a/tests/Kernels/Distance/GowerTest.php +++ b/tests/Kernels/Distance/GowerTest.php @@ -54,7 +54,7 @@ public function compute(array $a, array $b, $expected) : void } /** - * @return \Generator> + * @return Generator> */ public function computeProvider() : Generator { diff --git a/tests/Kernels/Distance/HammingTest.php b/tests/Kernels/Distance/HammingTest.php index 862887540..ee6b324fc 100644 --- a/tests/Kernels/Distance/HammingTest.php +++ b/tests/Kernels/Distance/HammingTest.php @@ -52,7 +52,7 @@ public function compute(array $a, array $b, $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { diff --git a/tests/Kernels/Distance/JaccardTest.php b/tests/Kernels/Distance/JaccardTest.php index 2e4d467ff..6d7c6d140 100644 --- a/tests/Kernels/Distance/JaccardTest.php +++ b/tests/Kernels/Distance/JaccardTest.php @@ -52,7 +52,7 @@ public function compute(array $a, array $b, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { diff --git a/tests/Kernels/Distance/ManhattanTest.php b/tests/Kernels/Distance/ManhattanTest.php index a80825879..d5c25db14 100644 --- a/tests/Kernels/Distance/ManhattanTest.php +++ b/tests/Kernels/Distance/ManhattanTest.php @@ -52,7 +52,7 @@ public function compute(array $a, array $b, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { diff --git a/tests/Kernels/Distance/MinkowskiTest.php b/tests/Kernels/Distance/MinkowskiTest.php index 4ea10e7cf..512ce5a3e 100644 --- a/tests/Kernels/Distance/MinkowskiTest.php +++ b/tests/Kernels/Distance/MinkowskiTest.php @@ -52,7 +52,7 @@ public function compute(array $a, array $b, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { diff --git a/tests/Kernels/Distance/SafeEuclideanTest.php b/tests/Kernels/Distance/SafeEuclideanTest.php index 7faf80a1c..6eaea9f0d 100644 --- a/tests/Kernels/Distance/SafeEuclideanTest.php +++ b/tests/Kernels/Distance/SafeEuclideanTest.php @@ -54,7 +54,7 @@ public function compute(array $a, array $b, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { diff --git a/tests/Kernels/Distance/SparseCosineTest.php b/tests/Kernels/Distance/SparseCosineTest.php index e4dda36b9..d74c6e03f 100644 --- a/tests/Kernels/Distance/SparseCosineTest.php +++ b/tests/Kernels/Distance/SparseCosineTest.php @@ -52,7 +52,7 @@ public function compute(array $a, array $b, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { diff --git a/tests/NeuralNet/ActivationFunctions/ELUTest.php b/tests/NeuralNet/ActivationFunctions/ELUTest.php index a1d9f093e..9e3df5524 100644 --- a/tests/NeuralNet/ActivationFunctions/ELUTest.php +++ b/tests/NeuralNet/ActivationFunctions/ELUTest.php @@ -62,7 +62,7 @@ public function activate(Matrix $input, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { @@ -105,7 +105,7 @@ public function differentiate(Matrix $input, Matrix $activations, array $expecte } /** - * @return \Generator + * @return Generator */ public function differentiateProvider() : Generator { diff --git a/tests/NeuralNet/ActivationFunctions/GELUTest.php b/tests/NeuralNet/ActivationFunctions/GELUTest.php index 2355d0fd9..bfe0e2c48 100644 --- a/tests/NeuralNet/ActivationFunctions/GELUTest.php +++ b/tests/NeuralNet/ActivationFunctions/GELUTest.php @@ -51,7 +51,7 @@ public function compute(Matrix $input, array $expected) : void } /** - * @return \Generator> + * @return Generator> */ public function computeProvider() : Generator { @@ -92,7 +92,7 @@ public function differentiate(Matrix $input, Matrix $activations, array $expecte } /** - * @return \Generator> + * @return Generator> */ public function differentiateProvider() : Generator { diff --git a/tests/NeuralNet/ActivationFunctions/HyperbolicTangentTest.php b/tests/NeuralNet/ActivationFunctions/HyperbolicTangentTest.php index c6af6d56a..7abf0cca4 100644 --- a/tests/NeuralNet/ActivationFunctions/HyperbolicTangentTest.php +++ b/tests/NeuralNet/ActivationFunctions/HyperbolicTangentTest.php @@ -51,7 +51,7 @@ public function activate(Matrix $input, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { @@ -94,7 +94,7 @@ public function differentiate(Matrix $input, Matrix $activations, array $expecte } /** - * @return \Generator + * @return Generator */ public function differentiateProvider() : Generator { diff --git a/tests/NeuralNet/ActivationFunctions/LeakyReLUTest.php b/tests/NeuralNet/ActivationFunctions/LeakyReLUTest.php index 9a199dff8..d76a31b50 100644 --- a/tests/NeuralNet/ActivationFunctions/LeakyReLUTest.php +++ b/tests/NeuralNet/ActivationFunctions/LeakyReLUTest.php @@ -51,7 +51,7 @@ public function activate(Matrix $input, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { @@ -94,7 +94,7 @@ public function differentiate(Matrix $input, Matrix $activations, array $expecte } /** - * @return \Generator + * @return Generator */ public function differentiateProvider() : Generator { diff --git a/tests/NeuralNet/ActivationFunctions/ReLUTest.php b/tests/NeuralNet/ActivationFunctions/ReLUTest.php index 44a8b86c9..221aec15a 100644 --- a/tests/NeuralNet/ActivationFunctions/ReLUTest.php +++ b/tests/NeuralNet/ActivationFunctions/ReLUTest.php @@ -51,7 +51,7 @@ public function activate(Matrix $input, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { @@ -94,7 +94,7 @@ public function differentiate(Matrix $input, Matrix $activations, array $expecte } /** - * @return \Generator + * @return Generator */ public function differentiateProvider() : Generator { diff --git a/tests/NeuralNet/ActivationFunctions/SELUTest.php b/tests/NeuralNet/ActivationFunctions/SELUTest.php index 149501dbd..d103cb083 100644 --- a/tests/NeuralNet/ActivationFunctions/SELUTest.php +++ b/tests/NeuralNet/ActivationFunctions/SELUTest.php @@ -51,7 +51,7 @@ public function activate(Matrix $input, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { @@ -94,7 +94,7 @@ public function differentiate(Matrix $input, Matrix $activations, array $expecte } /** - * @return \Generator + * @return Generator */ public function differentiateProvider() : Generator { diff --git a/tests/NeuralNet/ActivationFunctions/SiLUTest.php b/tests/NeuralNet/ActivationFunctions/SiLUTest.php index db30007fd..eb43a7d34 100644 --- a/tests/NeuralNet/ActivationFunctions/SiLUTest.php +++ b/tests/NeuralNet/ActivationFunctions/SiLUTest.php @@ -51,7 +51,7 @@ public function compute(Matrix $input, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { @@ -94,7 +94,7 @@ public function differentiate(Matrix $input, Matrix $activations, array $expecte } /** - * @return \Generator + * @return Generator */ public function differentiateProvider() : Generator { diff --git a/tests/NeuralNet/ActivationFunctions/SigmoidTest.php b/tests/NeuralNet/ActivationFunctions/SigmoidTest.php index a8694ede9..5ef6056c7 100644 --- a/tests/NeuralNet/ActivationFunctions/SigmoidTest.php +++ b/tests/NeuralNet/ActivationFunctions/SigmoidTest.php @@ -51,7 +51,7 @@ public function activate(Matrix $input, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { @@ -94,7 +94,7 @@ public function differentiate(Matrix $input, Matrix $activations, array $expecte } /** - * @return \Generator + * @return Generator */ public function differentiateProvider() : Generator { diff --git a/tests/NeuralNet/ActivationFunctions/SoftPlusTest.php b/tests/NeuralNet/ActivationFunctions/SoftPlusTest.php index 6389248af..3a1d1ea52 100644 --- a/tests/NeuralNet/ActivationFunctions/SoftPlusTest.php +++ b/tests/NeuralNet/ActivationFunctions/SoftPlusTest.php @@ -51,7 +51,7 @@ public function activate(Matrix $input, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { @@ -94,7 +94,7 @@ public function differentiate(Matrix $input, Matrix $activations, array $expecte } /** - * @return \Generator + * @return Generator */ public function differentiateProvider() : Generator { diff --git a/tests/NeuralNet/ActivationFunctions/SoftmaxTest.php b/tests/NeuralNet/ActivationFunctions/SoftmaxTest.php index 0859efea9..0780cfe88 100644 --- a/tests/NeuralNet/ActivationFunctions/SoftmaxTest.php +++ b/tests/NeuralNet/ActivationFunctions/SoftmaxTest.php @@ -51,7 +51,7 @@ public function activate(Matrix $input, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { @@ -98,7 +98,7 @@ public function differentiate(Matrix $input, Matrix $activations, array $expecte } /** - * @return \Generator + * @return Generator */ public function differentiateProvider() : Generator { diff --git a/tests/NeuralNet/ActivationFunctions/SoftsignTest.php b/tests/NeuralNet/ActivationFunctions/SoftsignTest.php index e4f69ea48..886941e57 100644 --- a/tests/NeuralNet/ActivationFunctions/SoftsignTest.php +++ b/tests/NeuralNet/ActivationFunctions/SoftsignTest.php @@ -51,7 +51,7 @@ public function activate(Matrix $input, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { @@ -94,7 +94,7 @@ public function differentiate(Matrix $input, Matrix $activations, array $expecte } /** - * @return \Generator + * @return Generator */ public function differentiateProvider() : Generator { diff --git a/tests/NeuralNet/ActivationFunctions/ThresholdedReLUTest.php b/tests/NeuralNet/ActivationFunctions/ThresholdedReLUTest.php index 05dfd7baf..8c638e617 100644 --- a/tests/NeuralNet/ActivationFunctions/ThresholdedReLUTest.php +++ b/tests/NeuralNet/ActivationFunctions/ThresholdedReLUTest.php @@ -51,7 +51,7 @@ public function activate(Matrix $input, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { @@ -94,7 +94,7 @@ public function differentiate(Matrix $input, Matrix $activations, array $expecte } /** - * @return \Generator + * @return Generator */ public function differentiateProvider() : Generator { diff --git a/tests/NeuralNet/CostFunctions/CrossEntropyTest.php b/tests/NeuralNet/CostFunctions/CrossEntropyTest.php index ffc5b630d..1188b1c0f 100644 --- a/tests/NeuralNet/CostFunctions/CrossEntropyTest.php +++ b/tests/NeuralNet/CostFunctions/CrossEntropyTest.php @@ -52,7 +52,7 @@ public function compute(Matrix $output, Matrix $target, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { @@ -117,7 +117,7 @@ public function differentiate(Matrix $output, Matrix $target, array $expected) : } /** - * @return \Generator + * @return Generator */ public function differentiateProvider() : Generator { diff --git a/tests/NeuralNet/CostFunctions/HuberLossTest.php b/tests/NeuralNet/CostFunctions/HuberLossTest.php index 104f873eb..e9ca7b21f 100644 --- a/tests/NeuralNet/CostFunctions/HuberLossTest.php +++ b/tests/NeuralNet/CostFunctions/HuberLossTest.php @@ -52,7 +52,7 @@ public function compute(Matrix $output, Matrix $target, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { @@ -111,7 +111,7 @@ public function differentiate(Matrix $output, Matrix $target, array $expected) : } /** - * @return \Generator + * @return Generator */ public function differentiateProvider() : Generator { diff --git a/tests/NeuralNet/CostFunctions/LeastSquaresTest.php b/tests/NeuralNet/CostFunctions/LeastSquaresTest.php index 3e7a2c3c5..edcd1a942 100644 --- a/tests/NeuralNet/CostFunctions/LeastSquaresTest.php +++ b/tests/NeuralNet/CostFunctions/LeastSquaresTest.php @@ -52,7 +52,7 @@ public function compute(Matrix $output, Matrix $target, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { @@ -111,7 +111,7 @@ public function differentiate(Matrix $output, Matrix $target, array $expected) : } /** - * @return \Generator + * @return Generator */ public function differentiateProvider() : Generator { diff --git a/tests/NeuralNet/CostFunctions/RelativeEntropyTest.php b/tests/NeuralNet/CostFunctions/RelativeEntropyTest.php index a010ea2ae..d4f313a93 100644 --- a/tests/NeuralNet/CostFunctions/RelativeEntropyTest.php +++ b/tests/NeuralNet/CostFunctions/RelativeEntropyTest.php @@ -52,7 +52,7 @@ public function compute(Matrix $output, Matrix $target, float $expected) : void } /** - * @return \Generator + * @return Generator */ public function computeProvider() : Generator { @@ -117,7 +117,7 @@ public function differentiate(Matrix $output, Matrix $target, array $expected) : } /** - * @return \Generator + * @return Generator */ public function differentiateProvider() : Generator { diff --git a/tests/NeuralNet/Optimizers/AdaGradTest.php b/tests/NeuralNet/Optimizers/AdaGradTest.php index dadfb54fa..2ecd9697d 100644 --- a/tests/NeuralNet/Optimizers/AdaGradTest.php +++ b/tests/NeuralNet/Optimizers/AdaGradTest.php @@ -45,7 +45,7 @@ public function build() : void * @dataProvider stepProvider * * @param Parameter $param - * @param \Tensor\Tensor $gradient + * @param Tensor $gradient * @param list> $expected */ public function step(Parameter $param, Tensor $gradient, array $expected) : void @@ -58,7 +58,7 @@ public function step(Parameter $param, Tensor $gradient, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function stepProvider() : Generator { diff --git a/tests/NeuralNet/Optimizers/AdaMaxTest.php b/tests/NeuralNet/Optimizers/AdaMaxTest.php index 15d7992ea..8fc42cbcd 100644 --- a/tests/NeuralNet/Optimizers/AdaMaxTest.php +++ b/tests/NeuralNet/Optimizers/AdaMaxTest.php @@ -45,7 +45,7 @@ public function build() : void * @dataProvider stepProvider * * @param Parameter $param - * @param \Tensor\Tensor $gradient + * @param Tensor $gradient * @param list> $expected */ public function step(Parameter $param, Tensor $gradient, array $expected) : void @@ -58,7 +58,7 @@ public function step(Parameter $param, Tensor $gradient, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function stepProvider() : Generator { diff --git a/tests/NeuralNet/Optimizers/AdamTest.php b/tests/NeuralNet/Optimizers/AdamTest.php index 3b760ca7f..52d2a9835 100644 --- a/tests/NeuralNet/Optimizers/AdamTest.php +++ b/tests/NeuralNet/Optimizers/AdamTest.php @@ -45,7 +45,7 @@ public function build() : void * @dataProvider stepProvider * * @param Parameter $param - * @param \Tensor\Tensor $gradient + * @param Tensor $gradient * @param list> $expected */ public function step(Parameter $param, Tensor $gradient, array $expected) : void @@ -58,7 +58,7 @@ public function step(Parameter $param, Tensor $gradient, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function stepProvider() : Generator { diff --git a/tests/NeuralNet/Optimizers/CyclicalTest.php b/tests/NeuralNet/Optimizers/CyclicalTest.php index 5d36b6765..1e488a6dc 100644 --- a/tests/NeuralNet/Optimizers/CyclicalTest.php +++ b/tests/NeuralNet/Optimizers/CyclicalTest.php @@ -43,7 +43,7 @@ public function build() : void * @dataProvider stepProvider * * @param Parameter $param - * @param \Tensor\Tensor $gradient + * @param Tensor $gradient * @param list> $expected */ public function step(Parameter $param, Tensor $gradient, array $expected) : void @@ -54,7 +54,7 @@ public function step(Parameter $param, Tensor $gradient, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function stepProvider() : Generator { diff --git a/tests/NeuralNet/Optimizers/MomentumTest.php b/tests/NeuralNet/Optimizers/MomentumTest.php index 8380c7267..86ba983cc 100644 --- a/tests/NeuralNet/Optimizers/MomentumTest.php +++ b/tests/NeuralNet/Optimizers/MomentumTest.php @@ -45,7 +45,7 @@ public function build() : void * @dataProvider stepProvider * * @param Parameter $param - * @param \Tensor\Tensor $gradient + * @param Tensor $gradient * @param list> $expected */ public function step(Parameter $param, Tensor $gradient, array $expected) : void @@ -58,7 +58,7 @@ public function step(Parameter $param, Tensor $gradient, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function stepProvider() : Generator { diff --git a/tests/NeuralNet/Optimizers/RMSPropTest.php b/tests/NeuralNet/Optimizers/RMSPropTest.php index 2458a7585..7a6540e3b 100644 --- a/tests/NeuralNet/Optimizers/RMSPropTest.php +++ b/tests/NeuralNet/Optimizers/RMSPropTest.php @@ -45,7 +45,7 @@ public function build() : void * @dataProvider stepProvider * * @param Parameter $param - * @param \Tensor\Tensor $gradient + * @param Tensor $gradient * @param list> $expected */ public function step(Parameter $param, Tensor $gradient, array $expected) : void @@ -58,7 +58,7 @@ public function step(Parameter $param, Tensor $gradient, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function stepProvider() : Generator { diff --git a/tests/NeuralNet/Optimizers/StepDecayTest.php b/tests/NeuralNet/Optimizers/StepDecayTest.php index f8afd101a..4c4201bd4 100644 --- a/tests/NeuralNet/Optimizers/StepDecayTest.php +++ b/tests/NeuralNet/Optimizers/StepDecayTest.php @@ -43,7 +43,7 @@ public function build() : void * @dataProvider stepProvider * * @param Parameter $param - * @param \Tensor\Tensor $gradient + * @param Tensor $gradient * @param list> $expected */ public function step(Parameter $param, Tensor $gradient, array $expected) : void @@ -54,7 +54,7 @@ public function step(Parameter $param, Tensor $gradient, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function stepProvider() : Generator { diff --git a/tests/NeuralNet/Optimizers/StochasticTest.php b/tests/NeuralNet/Optimizers/StochasticTest.php index 96ddd0e98..da6202cc0 100644 --- a/tests/NeuralNet/Optimizers/StochasticTest.php +++ b/tests/NeuralNet/Optimizers/StochasticTest.php @@ -43,7 +43,7 @@ public function build() : void * @dataProvider stepProvider * * @param Parameter $param - * @param \Tensor\Tensor $gradient + * @param Tensor $gradient * @param list> $expected */ public function step(Parameter $param, Tensor $gradient, array $expected) : void @@ -54,7 +54,7 @@ public function step(Parameter $param, Tensor $gradient, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function stepProvider() : Generator { diff --git a/tests/Specifications/DatasetHasDimensionalityTest.php b/tests/Specifications/DatasetHasDimensionalityTest.php index 8fce16464..613341ab5 100644 --- a/tests/Specifications/DatasetHasDimensionalityTest.php +++ b/tests/Specifications/DatasetHasDimensionalityTest.php @@ -27,7 +27,7 @@ public function passes(DatasetHasDimensionality $specification, bool $expected) } /** - * @return \Generator + * @return Generator */ public function passesProvider() : Generator { diff --git a/tests/Specifications/DatasetIsLabeledTest.php b/tests/Specifications/DatasetIsLabeledTest.php index 77908558a..0ea22bb80 100644 --- a/tests/Specifications/DatasetIsLabeledTest.php +++ b/tests/Specifications/DatasetIsLabeledTest.php @@ -27,7 +27,7 @@ public function passes(DatasetIsLabeled $specification, bool $expected) : void } /** - * @return \Generator + * @return Generator */ public function passesProvider() : Generator { diff --git a/tests/Specifications/DatasetIsNotEmptyTest.php b/tests/Specifications/DatasetIsNotEmptyTest.php index 99057da69..de0bdb965 100644 --- a/tests/Specifications/DatasetIsNotEmptyTest.php +++ b/tests/Specifications/DatasetIsNotEmptyTest.php @@ -26,7 +26,7 @@ public function passes(DatasetIsNotEmpty $specification, bool $expected) : void } /** - * @return \Generator + * @return Generator */ public function passesProvider() : Generator { diff --git a/tests/Specifications/EstimatorIsCompatibleWithMetricTest.php b/tests/Specifications/EstimatorIsCompatibleWithMetricTest.php index f3ffcbf6b..c70ed94f3 100644 --- a/tests/Specifications/EstimatorIsCompatibleWithMetricTest.php +++ b/tests/Specifications/EstimatorIsCompatibleWithMetricTest.php @@ -31,7 +31,7 @@ public function passes(EstimatorIsCompatibleWithMetric $specification, bool $exp } /** - * @return \Generator + * @return Generator */ public function passesProvider() : Generator { diff --git a/tests/Specifications/ExtensionIsLoadedTest.php b/tests/Specifications/ExtensionIsLoadedTest.php index 2fb2c0ca2..5e927199f 100644 --- a/tests/Specifications/ExtensionIsLoadedTest.php +++ b/tests/Specifications/ExtensionIsLoadedTest.php @@ -26,7 +26,7 @@ public function passes(ExtensionIsLoaded $specification, bool $expected) : void } /** - * @return \Generator + * @return Generator */ public function passesProvider() : Generator { diff --git a/tests/Specifications/ExtensionMinimumVersionTest.php b/tests/Specifications/ExtensionMinimumVersionTest.php index 84a4c0692..43db97a1a 100644 --- a/tests/Specifications/ExtensionMinimumVersionTest.php +++ b/tests/Specifications/ExtensionMinimumVersionTest.php @@ -26,7 +26,7 @@ public function passes(ExtensionMinimumVersion $specification, bool $expected) : } /** - * @return \Generator + * @return Generator */ public function passesProvider() : Generator { diff --git a/tests/Specifications/LabelsAreCompatibleWithLearnerTest.php b/tests/Specifications/LabelsAreCompatibleWithLearnerTest.php index 85053d195..e97b926ee 100644 --- a/tests/Specifications/LabelsAreCompatibleWithLearnerTest.php +++ b/tests/Specifications/LabelsAreCompatibleWithLearnerTest.php @@ -28,7 +28,7 @@ public function passes(LabelsAreCompatibleWithLearner $specification, bool $expe } /** - * @return \Generator + * @return Generator */ public function passesProvider() : Generator { diff --git a/tests/Specifications/SamplesAreCompatibleWithDistanceTest.php b/tests/Specifications/SamplesAreCompatibleWithDistanceTest.php index 52e279f0d..6dc360537 100644 --- a/tests/Specifications/SamplesAreCompatibleWithDistanceTest.php +++ b/tests/Specifications/SamplesAreCompatibleWithDistanceTest.php @@ -28,7 +28,7 @@ public function passes(SamplesAreCompatibleWithDistance $specification, bool $ex } /** - * @return \Generator + * @return Generator */ public function passesProvider() : Generator { diff --git a/tests/Specifications/SamplesAreCompatibleWithEstimatorTest.php b/tests/Specifications/SamplesAreCompatibleWithEstimatorTest.php index 5d1aff3af..ae5d932d3 100644 --- a/tests/Specifications/SamplesAreCompatibleWithEstimatorTest.php +++ b/tests/Specifications/SamplesAreCompatibleWithEstimatorTest.php @@ -29,7 +29,7 @@ public function passes(SamplesAreCompatibleWithEstimator $specification, bool $e } /** - * @return \Generator + * @return Generator */ public function passesProvider() : Generator { diff --git a/tests/Specifications/SamplesAreCompatibleWithTransformerTest.php b/tests/Specifications/SamplesAreCompatibleWithTransformerTest.php index 9b65c0b48..7bef2e26f 100644 --- a/tests/Specifications/SamplesAreCompatibleWithTransformerTest.php +++ b/tests/Specifications/SamplesAreCompatibleWithTransformerTest.php @@ -29,7 +29,7 @@ public function passes(SamplesAreCompatibleWithTransformer $specification, bool } /** - * @return \Generator + * @return Generator */ public function passesProvider() : Generator { diff --git a/tests/Specifications/SpecificationChainTest.php b/tests/Specifications/SpecificationChainTest.php index 9365f0dc9..6ee697edf 100644 --- a/tests/Specifications/SpecificationChainTest.php +++ b/tests/Specifications/SpecificationChainTest.php @@ -28,7 +28,7 @@ public function passes(SpecificationChain $specification, bool $expected) : void } /** - * @return \Generator + * @return Generator */ public function passesProvider() : Generator { diff --git a/tests/Tokenizers/KSkipNGramTest.php b/tests/Tokenizers/KSkipNGramTest.php index f05723865..943565531 100644 --- a/tests/Tokenizers/KSkipNGramTest.php +++ b/tests/Tokenizers/KSkipNGramTest.php @@ -50,7 +50,7 @@ public function tokenize(string $text, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function tokenizeProvider() : Generator { diff --git a/tests/Tokenizers/NGramTest.php b/tests/Tokenizers/NGramTest.php index b7915f35a..9712c12ff 100644 --- a/tests/Tokenizers/NGramTest.php +++ b/tests/Tokenizers/NGramTest.php @@ -50,7 +50,7 @@ public function tokenize(string $text, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function tokenizeProvider() : Generator { diff --git a/tests/Tokenizers/SentenceTest.php b/tests/Tokenizers/SentenceTest.php index 1d4166dd3..783d27b4d 100644 --- a/tests/Tokenizers/SentenceTest.php +++ b/tests/Tokenizers/SentenceTest.php @@ -50,7 +50,7 @@ public function tokenize(string $text, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function tokenizeProvider() : Generator { diff --git a/tests/Tokenizers/WhitespaceTest.php b/tests/Tokenizers/WhitespaceTest.php index 57fa251be..5fccb8466 100644 --- a/tests/Tokenizers/WhitespaceTest.php +++ b/tests/Tokenizers/WhitespaceTest.php @@ -47,7 +47,7 @@ public function tokenize(string $text, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function tokenizeProvider() : Generator { diff --git a/tests/Tokenizers/WordStemmerTest.php b/tests/Tokenizers/WordStemmerTest.php index 5e5fdebb8..7722771cb 100644 --- a/tests/Tokenizers/WordStemmerTest.php +++ b/tests/Tokenizers/WordStemmerTest.php @@ -52,7 +52,7 @@ public function tokenize(string $text, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function tokenizeProvider() : Generator { diff --git a/tests/Tokenizers/WordTest.php b/tests/Tokenizers/WordTest.php index 4ea2f7677..681c409ba 100644 --- a/tests/Tokenizers/WordTest.php +++ b/tests/Tokenizers/WordTest.php @@ -50,7 +50,7 @@ public function tokenize(string $text, array $expected) : void } /** - * @return \Generator + * @return Generator */ public function tokenizeProvider() : Generator { diff --git a/tests/Transformers/GaussianRandomProjectorTest.php b/tests/Transformers/GaussianRandomProjectorTest.php index b1ffce116..fbf1c2fa6 100644 --- a/tests/Transformers/GaussianRandomProjectorTest.php +++ b/tests/Transformers/GaussianRandomProjectorTest.php @@ -69,7 +69,7 @@ public function minDimensions(int $n, float $maxDistortion, int $expected) : voi } /** - * @return \Generator + * @return Generator */ public function minDimensionsProvider() : Generator { diff --git a/tests/Transformers/OneHotEncoderTest.php b/tests/Transformers/OneHotEncoderTest.php index b6851d213..9ca992a0b 100644 --- a/tests/Transformers/OneHotEncoderTest.php +++ b/tests/Transformers/OneHotEncoderTest.php @@ -74,7 +74,7 @@ public function fitTransform() : void /** * @test */ - public function fitTransformNone() : void + public function fitTransformWithExcluded() : void { $dataset = new Unlabeled([ ['nice', 'furry', 'friendly'], @@ -83,7 +83,7 @@ public function fitTransformNone() : void ['mean', 'rough', 'friendly'], ]); - $this->transformer = new OneHotEncoder('furry'); + $this->transformer = new OneHotEncoder(['furry']); $this->transformer->fit($dataset);