Skip to content

Commit

Permalink
Merge remote-tracking branch 'rubixml/2.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
mcharytoniuk committed Jan 15, 2024
2 parents 703404b + 865e54a commit 50d00bf
Show file tree
Hide file tree
Showing 543 changed files with 2,521 additions and 1,654 deletions.
8 changes: 4 additions & 4 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
'class_attributes_separation' => true,
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'compact_nullable_typehint' => true,
'compact_nullable_type_declaration' => true,
'concat_space' => ['spacing' => 'one'],
'fully_qualified_strict_types' => true,
'increment_style' => ['style' => 'pre'],
Expand All @@ -42,8 +42,8 @@
'strategy' => 'no_multi_line',
],
'native_function_casing' => true,
'native_function_type_declaration_casing' => true,
'new_with_braces' => true,
'native_type_declaration_casing' => true,
'new_with_parentheses' => true,
'no_alternative_syntax' => true,
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
Expand All @@ -60,7 +60,7 @@
'no_superfluous_elseif' => true,
'no_trailing_comma_in_singleline' => true,
'no_unneeded_control_parentheses' => true,
'no_unneeded_curly_braces' => true,
'no_unneeded_braces' => true,
'no_unset_cast' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
- 2.5.0
- Added Vantage Point Spatial tree
- Blob Generator can now `simulate()` a Dataset object

- 2.4.1
- Sentence Tokenizer fix Arabic and Farsi language support
- Optimize online variance updating
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/AnomalyDetectors/GaussianMLEBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class GaussianMLEBench
protected $testing;

/**
* @var \Rubix\ML\AnomalyDetectors\GaussianMLE
* @var GaussianMLE
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/AnomalyDetectors/IsolationForestBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class IsolationForestBench
protected $testing;

/**
* @var \Rubix\ML\AnomalyDetectors\IsolationForest
* @var IsolationForest
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/AnomalyDetectors/LocalOutlierFactorBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class LocalOutlierFactorBench
protected $testing;

/**
* @var \Rubix\ML\AnomalyDetectors\LocalOutlierFactor
* @var LocalOutlierFactor
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/AnomalyDetectors/LodaBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class LodaBench
protected $testing;

/**
* @var \Rubix\ML\AnomalyDetectors\Loda
* @var Loda
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/AnomalyDetectors/OneClassSVMBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class OneClassSVMBench
protected $testing;

/**
* @var \Rubix\ML\AnomalyDetectors\OneClassSVM
* @var OneClassSVM
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/AnomalyDetectors/RobustZScoreBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class RobustZScoreBench
protected $testing;

/**
* @var \Rubix\ML\AnomalyDetectors\RobustZScore
* @var RobustZScore
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Classifiers/AdaBoostBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AdaBoostBench
protected $testing;

/**
* @var \Rubix\ML\Classifiers\AdaBoost
* @var AdaBoost
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Classifiers/ClassificationTreeBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ClassificationTreeBench
protected $testing;

/**
* @var \Rubix\ML\Classifiers\ClassificationTree
* @var ClassificationTree
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Classifiers/ExtraTreeClassifierBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ExtraTreeClassifierBench
protected $testing;

/**
* @var \Rubix\ML\Classifiers\ExtraTreeClassifier
* @var ExtraTreeClassifier
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Classifiers/GaussianNBBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class GaussianNBBench
protected $testing;

/**
* @var \Rubix\ML\Classifiers\GaussianNB
* @var GaussianNB
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Classifiers/KDNeighborsBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class KDNeighborsBench
protected $testing;

/**
* @var \Rubix\ML\Classifiers\KDNeighbors
* @var KDNeighbors
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Classifiers/KNearestNeighborsBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class KNearestNeighborsBench
protected $testing;

/**
* @var \Rubix\ML\Classifiers\KNearestNeighbors
* @var KNearestNeighbors
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Classifiers/LogisticRegressionBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class LogisticRegressionBench
protected $testing;

/**
* @var \Rubix\ML\Classifiers\LogisticRegression
* @var LogisticRegression
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Classifiers/LogitBoostBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class LogitBoostBench
protected $testing;

/**
* @var \Rubix\ML\Classifiers\LogitBoost
* @var LogitBoost
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Classifiers/MultilayerPerceptronBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class MultilayerPerceptronBench
protected $testing;

/**
* @var \Rubix\ML\Classifiers\MultilayerPerceptron
* @var MultilayerPerceptron
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Classifiers/NaiveBayesBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class NaiveBayesBench
protected $testing;

/**
* @var \Rubix\ML\Classifiers\NaiveBayes
* @var NaiveBayes
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Classifiers/OneVsRestBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class OneVsRestBench
protected $testing;

/**
* @var \Rubix\ML\Classifiers\OneVsRest
* @var OneVsRest
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Classifiers/RadiusNeighborsBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class RadiusNeighborsBench
protected $testing;

/**
* @var \Rubix\ML\Classifiers\RadiusNeighbors
* @var RadiusNeighbors
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Classifiers/RandomForestBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class RandomForestBench
protected $testing;

/**
* @var \Rubix\ML\Classifiers\RandomForest
* @var RandomForest
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Classifiers/SVCBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class SVCBench
protected $testing;

/**
* @var \Rubix\ML\Classifiers\SVC
* @var SVC
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Classifiers/SoftmaxClassifierBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SoftmaxClassifierBench
protected $testing;

/**
* @var \Rubix\ML\Classifiers\SoftmaxClassifier
* @var SoftmaxClassifier
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Clusterers/DBSCANBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class DBSCANBench
protected $testing;

/**
* @var \Rubix\ML\Clusterers\DBSCAN
* @var DBSCAN
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Clusterers/FuzzyCMeansBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class FuzzyCMeansBench
protected $testing;

/**
* @var \Rubix\ML\Clusterers\FuzzyCMeans
* @var FuzzyCMeans
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Clusterers/GaussianMixtureBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class GaussianMixtureBench
protected $testing;

/**
* @var \Rubix\ML\Clusterers\GaussianMixture
* @var GaussianMixture
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Clusterers/KMeansBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class KMeansBench
protected $testing;

/**
* @var \Rubix\ML\Clusterers\KMeans
* @var KMeans
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Clusterers/MeanShiftBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class MeanShiftBench
protected $testing;

/**
* @var \Rubix\ML\Clusterers\MeanShift
* @var MeanShift
*/
protected $estimator;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Graph/Trees/BallTreeBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class BallTreeBench
protected $dataset;

/**
* @var \Rubix\ML\Graph\Trees\BallTree
* @var BallTree
*/
protected $tree;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Graph/Trees/KDTreeBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class KDTreeBench
protected $dataset;

/**
* @var \Rubix\ML\Graph\Trees\KDTree
* @var KDTree
*/
protected $tree;

Expand Down
49 changes: 49 additions & 0 deletions benchmarks/Graph/Trees/VantageTreeBench.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

namespace Rubix\ML\Benchmarks\Graph\Trees;

use Rubix\ML\Graph\Trees\VantageTree;
use Rubix\ML\Datasets\Generators\Blob;
use Rubix\ML\Datasets\Generators\Agglomerate;

/**
* @Groups({"Trees"})
* @BeforeMethods({"setUp"})
*/
class VantageTreeBench
{
protected const DATASET_SIZE = 10000;

/**
* @var \Rubix\ML\Datasets\Labeled;
*/
protected $dataset;

/**
* @var VantageTree
*/
protected $tree;

public function setUp() : void
{
$generator = new Agglomerate([
'Iris-setosa' => new Blob([5.0, 3.42, 1.46, 0.24], [0.35, 0.38, 0.17, 0.1]),
'Iris-versicolor' => new Blob([5.94, 2.77, 4.26, 1.33], [0.51, 0.31, 0.47, 0.2]),
'Iris-virginica' => new Blob([6.59, 2.97, 5.55, 2.03], [0.63, 0.32, 0.55, 0.27]),
]);

$this->dataset = $generator->generate(self::DATASET_SIZE);

$this->tree = new VantageTree(30);
}

/**
* @Subject
* @Iterations(3)
* @OutputTimeUnit("seconds", precision=3)
*/
public function grow() : void
{
$this->tree->grow($this->dataset);
}
}
2 changes: 1 addition & 1 deletion benchmarks/Kernels/Distance/CanberraBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CanberraBench
protected $bSamples;

/**
* @var \Rubix\ML\Kernels\Distance\Canberra
* @var Canberra
*/
protected $kernel;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Kernels/Distance/CosineBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class CosineBench
protected $bSamples;

/**
* @var \Rubix\ML\Kernels\Distance\Cosine
* @var Cosine
*/
protected $kernel;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Kernels/Distance/DiagonalBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DiagonalBench
protected $bSamples;

/**
* @var \Rubix\ML\Kernels\Distance\Diagonal
* @var Diagonal
*/
protected $kernel;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Kernels/Distance/EuclideanBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class EuclideanBench
protected $bSamples;

/**
* @var \Rubix\ML\Kernels\Distance\Euclidean
* @var Euclidean
*/
protected $kernel;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Kernels/Distance/GowerBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class GowerBench
protected $bSamples;

/**
* @var \Rubix\ML\Kernels\Distance\Gower
* @var Gower
*/
protected $kernel;

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Kernels/Distance/JaccardBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class JaccardBench
protected $bSamples;

/**
* @var \Rubix\ML\Kernels\Distance\Jaccard
* @var Jaccard
*/
protected $kernel;

Expand Down
Loading

0 comments on commit 50d00bf

Please sign in to comment.