-
-
Notifications
You must be signed in to change notification settings - Fork 193
396 convert regressors to num power #411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
apphp
wants to merge
152
commits into
RubixML:3.0
Choose a base branch
from
apphp:396-convert-regressors-to-num-power
base: 3.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
152 commits
Select commit
Hold shift + click to select a range
c80d278
ML-396 Converted MLPRegressor to work with NumPower/NDArray related c…
apphp 13acae6
ML-396 removed unneeded export function
apphp 3b65a47
ML-396 added test for NumPower
apphp d7404f8
ML-396 added USE_NUMPOWER_TRANSPOSE option to Network
apphp d538799
ML-396 added USE_NUMPOWER_TRANSPOSE option to Network
apphp f333c67
ML-396 fixed issue with samples normalization
apphp 1583ee3
ML-396 removed unneeded packages from composer
apphp 57037c6
ML-396 removed unneeded packages from composer
apphp 22df3e0
Merge branch '3.0' into 396-convert-mlp-classifier-to-NumPower
apphp b79ddb6
Merge branch '3.0' into 396-convert-mlp-classifier-to-NumPower
apphp cab6925
Merge branch '3.0' into 396-convert-mlp-classifier-to-NumPower
apphp b920665
ML-396 style fixes
apphp b99d65b
ML-396 migrated MLPRegressor
apphp e04867b
ML-396 migrated MLPRegressor
apphp 36a282e
ML-396 migrated MLPRegressor
apphp 9bc5107
ML-396 migrated MLPRegressor
apphp 2a69709
ML-396 migrated MLPRegressor
apphp 76093fd
ML-396 migrated Adaline
apphp 0d35e60
ML-396 migrated Adaline
apphp 289b822
ML-396 migrated Adaline
apphp 4e19926
ML-396 migrated ExtraTreeRegressor with Hyperplane
apphp f18ceaa
ML-396 migrated RegressionTree
apphp f22c58c
ML-396 migrated GradientBoost
apphp 8a24b57
ML-396 migrated Ridge
apphp 5052675
ML-396 migrated Ridge
apphp 4c31a38
ML-396 migrated Ridge
apphp b6f3665
ML-396 Added tests for Ridge
apphp 41b144c
ML-396 Added AdalineTest
apphp 7017b0f
ML-396 fixes for STAN
apphp 60a1100
ML-396 fixes for STAN
apphp cfbd391
ML-396 fixes for Ridge and tests
apphp f730d69
ML-396 fix for ErrorAnalysisTest
apphp a700418
ML-396 fix for ErrorAnalysisTest
apphp 320871f
ML-396 fix for tests
apphp 5412c79
ML-396 fix for tests
apphp d1e9a6d
ML-396 fix for tests
apphp 6016eef
ML-396 fix for tests
apphp 2e627c0
ML-396 fix for tests
apphp 8cb3a16
ML-396 fix for tests
apphp 83d0a63
ML-396 fix for tests
apphp 252003c
ML-396 fix for tests
apphp 95516c4
ML-396 fix for tests
apphp a932a92
ML-396 fix for tests
apphp 17e6bce
ML-396 fix for tests
apphp aa1553b
ML-396 additional tests for ExtraTreeRegressorTest
apphp 2b0cbb3
ML-396 additional tests for ExtraTreeRegressorTest
apphp 5c79fa1
ML-396 fix for tests
apphp 6b1af3d
ML-396 fix for tests
apphp d558360
ML-396 fix for tests
apphp 0de66d5
ML-396 additional tests for GradientBoostTest
apphp 12aee96
ML-396 additional tests for GradientBoostTest
apphp d79f7a8
ML-396 additional tests for GradientBoostTest
apphp 293837c
ML-396 fix for tests
apphp 5372b35
ML-396 additional tests for MLPRegressorTest
apphp 61f8204
ML-396 additional tests for RegressionTreeTest
apphp 43a6c97
ML-396 fix for tests
apphp e396c04
ML-396 RadiusNeighborsRegressor migrated to NumPower
apphp c7e6448
ML-396 fix for tests
apphp e8197a9
ML-396 fix for tests
apphp 3d92727
ML-396 fix for tests
apphp 080006a
ML-396 fix for tests
apphp adb2d51
ML-396 fix for tests
apphp 67673cc
ML-396 fix for tests
apphp 02ca4eb
ML-396 fix for tests
apphp 84bc347
ML-396 KNNRegressor migrated to NumPower
apphp 72f08e7
ML-396 KDNeighborsRegressor migrated to NumPower
apphp bd0c461
ML-396 KDNeighborsRegressor migrated to NumPower
apphp 0a395a4
ML-396 added DataProviderExternal to RidgeTest
apphp 7e64e6f
ML-396 removed unused imports
apphp 42664e1
ML-396 SVR migrated to dedicated namespace and updated dependencies
apphp 2cc5ff4
ML-396 minor code style fixes
apphp 269d17f
ML-396 added determinant test with DataProvider to NumPowerTest
apphp eaede75
ML-396 updated @var annotation for params in SVR class
apphp aac88da
ML-396 removed unneeded debug
apphp a49cc3e
ML-396 removed unneeded debug
apphp e179684
ML-396 added validation for empty ensemble, cleaned dependencies, upd…
apphp 9daa783
ML-396 fixed regex pattern in PHPStan baseline to escape '#' properly
apphp 75636f8
ML-396 updated changelog with array_pack function and NDArray migrati…
apphp b1289eb
ML-396 added tests for array_pack function, extended its functionalit…
apphp f675d0f
ML-396 updated PHPStan baseline and refined annotations for array_pac…
apphp 6193dae
ML-396 restored test cases for array_pack and adjusted return type de…
apphp 8036cbd
ML-396 added ELU benchmark tests and enforced strict type annotations…
apphp 4d041f3
ML-396 added GELUBench benchmark tests
apphp d69c40a
ML-396 changed computed with activate in GELUBench
apphp 46ba110
ML-396 added LeakyReLUBench benchmark tests
apphp 8606a44
ML-396 added AdalineBench benchmark tests
apphp e5d3a13
ML-396 added ExtraTreeRegressorBench benchmark tests
apphp e4717dc
ML-396 added ReLUBench benchmark tests
apphp cd94934
ML-396 added SELUBench benchmark tests
apphp a0abae9
ML-396 added SigmoidBench benchmark tests
apphp 85cf6e8
ML-396 added SiLUBench benchmark tests
apphp 5372410
ML-396 added SoftPlusBench benchmark tests
apphp b4b57f1
ML-396 improved Softmax::differentiate
apphp fe9a0ee
ML-396 added SoftmaxBench benchmark tests
apphp ab1336d
ML-396 added GradientBoostBench benchmark tests
apphp 08f4935
ML-396 converted Blob generator to work with NDArray
apphp 83d69c6
ML-396 code style fix
apphp 672ea2e
ML-396 added SoftPlusBench benchmark tests
apphp abd0ba7
ML-396 added SoftsignBench benchmark tests
apphp 4b3379f
ML-396 added ThresholdedReLUBench benchmark tests
apphp b002bd4
ML-396 added KDNeighborsRegressorBench benchmark tests
apphp f69abf9
ML-396 added KNNRegressorBench benchmark tests
apphp 9f0e753
ML-396 migrated Agglomerate dataset to NDArray
apphp a07b170
ML-396 migrated Agglomerate dataset to NDArray
apphp 5f588dd
ML-396 added 10000 benchmark tests
apphp 8a20671
ML-396 added RadiusNeighborsRegressorBench benchmark tests
apphp 2a9bd5b
ML-396 added RegressionTreeBench benchmark tests
apphp d42a559
ML-396 added RidgeBench benchmark tests
apphp a620663
ML-396 added SVRBench benchmark tests
apphp 7dc7916
ML-396 Temporary fix for NumPower::array() 2nd parameter
apphp 02da7c5
ML-396 Temporary fix for NumPower::array() 2nd parameter
apphp dcce7a4
ML-396 Temporary fix for new version of NumPower and minor syntax fix…
apphp 606589a
ML-396 Fixed tests dataprovider check values
apphp e6312a9
ML-396 Fixed Agglomerate $weight prop to original array typt
apphp 96a9f60
ML-396 Fixed signature of first param in NumPower::uniform and NumPow…
apphp fc4615e
ML-396 Fixed signature of first param in NumPower::uniform
apphp 026e458
ML-396 added exclusion for argument.type warning in KNearestNeighbors…
apphp 5969c95
ML-396 changed initializer sampling from NumPower::truncatedNormal to…
apphp f0d5523
ML-396 changed initializer sampling from NumPower::truncatedNormal to…
apphp 83017fe
ML-396 added Standard deviation shrink factor to TruncatedNormal
apphp f20d657
ML-396 removed Standard deviation shrink factor to TruncatedNormal
apphp 1c453d4
ML-396 turned back exclusion to array_count_values in KNearestNeighbo…
apphp fa270dd
ML-396 refactoring TruncatedNormalTest
apphp 3bc982b
ML-396 updated RidgeProvider
apphp 22cbdb1
ML-396 updated RidgeProvider
apphp f807756
ML-396 refactored Circle generator to NumPower
apphp a1cea51
ML-396 reverted to Matrix usage KDNeighborsRegressor, KNNRegressor an…
apphp 140a2c0
ML-396 replaced old classes with new for AdalineBench
apphp de02f53
ML-396 replaced old classes with new for ExtraTreeRegressor
apphp 31214ad
ML-396 replaced old classes with new for GradientBoost
apphp df521a7
ML-396 replaced old classes with new for MLPRegressor
apphp 1067d2f
ML-396 replaced old classes with new for RadiusNeighborsRegressor
apphp 312948f
ML-396 replaced old classes with new for Ridge
apphp 74d9833
ML-396 replaced old classes with new for Ridge
apphp 6e31689
ML-396 replaced old classes with new for SVRBench
apphp 1c5b3d3
ML-396 replaced old classes with new for Agglomerate
apphp a67a941
ML-396 replaced old classes with new for Agglomerate
apphp 9f6123a
ML-396 replaced old classes with new for Agglomerate
apphp 543fc96
ML-396 replaced old classes with new for Blob
apphp 042d1ea
ML-396 replaced old classes with new for Circle
apphp 1a5940d
ML-396 replaced old classes with new for Hyperplane
apphp 8acf3cd
ML-396 replaced old classes with new for SwissRoll
apphp a0194e1
ML-396 stabilized SparseRandomProjectorTest and GridSearchTest
apphp 394d4b9
ML-396 stabilized SparseRandomProjectorTest and GridSearchTest
apphp 037d7ae
ML-396 stabilized RadiusNeighborsTest and DBSCANTest
apphp ce12de9
ML-396 stabilized KMeans and DBSCANTest
apphp 61116c5
ML-396 stabilized VantageTreeTest
apphp 0624dd8
ML-396 stabilized TruncatedNormalTest and BallTreeTest
apphp 128f31f
ML-396 stabilized TruncatedNormalTest and VantageTreeTest
apphp a1d5330
ML-396 stabilized GaussianMixtureTest and RidgeProvider
apphp 97a3348
ML-396 stabilized GaussianMixtureTest and RidgeProvider
apphp b58fea1
ML-396 stabilized GaussianMixtureTest and RidgeProvider
apphp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| <?php | ||
|
|
||
| namespace Rubix\ML\Benchmarks\NeuralNet\ActivationFunctions\ELU; | ||
|
|
||
| use NDArray; | ||
| use NumPower; | ||
| use Rubix\ML\NeuralNet\ActivationFunctions\ELU\ELU; | ||
|
|
||
| /** | ||
| * @Groups({"ActivationFunctions"}) | ||
| * @BeforeMethods({"setUp"}) | ||
| */ | ||
| class ELUBench | ||
| { | ||
| /** | ||
| * @var NDArray | ||
| */ | ||
| protected NDArray $z; | ||
|
|
||
| /** | ||
| * @var NDArray | ||
| */ | ||
| protected NDArray $computed; | ||
|
|
||
| /** | ||
| * @var ELU | ||
| */ | ||
| protected ELU $activationFn; | ||
|
|
||
| public function setUp() : void | ||
| { | ||
| $this->z = NumPower::uniform([500, 500], low: -1.0, high: 1.0); | ||
|
|
||
| $this->computed = NumPower::uniform([500, 500], low: -1.0, high: 1.0); | ||
|
|
||
| $this->activationFn = new ELU(); | ||
| } | ||
|
|
||
| /** | ||
| * @Subject | ||
| * @Iterations(3) | ||
| * @OutputTimeUnit("milliseconds", precision=3) | ||
| */ | ||
| public function activate() : void | ||
| { | ||
| $this->activationFn->activate($this->z); | ||
| } | ||
|
|
||
| /** | ||
| * @Subject | ||
| * @Iterations(3) | ||
| * @OutputTimeUnit("milliseconds", precision=3) | ||
| */ | ||
| public function differentiate() : void | ||
| { | ||
| $this->activationFn->differentiate($this->z, $this->computed); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
benchmarks/NeuralNet/ActivationFunctions/GELU/GELUBench.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| <?php | ||
|
|
||
| namespace Rubix\ML\Benchmarks\NeuralNet\ActivationFunctions\GELU; | ||
|
|
||
| use NDArray; | ||
| use NumPower; | ||
| use Rubix\ML\NeuralNet\ActivationFunctions\GELU\GELU; | ||
|
|
||
| /** | ||
| * @Groups({"ActivationFunctions"}) | ||
| * @BeforeMethods({"setUp"}) | ||
| */ | ||
| class GELUBench | ||
| { | ||
| /** | ||
| * @var NDArray | ||
| */ | ||
| protected NDArray $z; | ||
|
|
||
| /** | ||
| * @var NDArray | ||
| */ | ||
| protected NDArray $computed; | ||
|
|
||
| /** | ||
| * @var GELU | ||
| */ | ||
| protected GELU $activationFn; | ||
|
|
||
| public function setUp() : void | ||
| { | ||
| $this->z = NumPower::uniform([500, 500], low: -1.0, high: 1.0); | ||
|
|
||
| $this->computed = NumPower::uniform([500, 500], low: -1.0, high: 1.0); | ||
|
|
||
| $this->activationFn = new GELU(); | ||
| } | ||
|
|
||
| /** | ||
| * @Subject | ||
| * @Iterations(3) | ||
| * @OutputTimeUnit("milliseconds", precision=3) | ||
| */ | ||
| public function activate() : void | ||
| { | ||
| $this->activationFn->activate($this->z); | ||
| } | ||
|
|
||
| /** | ||
| * @Subject | ||
| * @Iterations(3) | ||
| * @OutputTimeUnit("milliseconds", precision=3) | ||
| */ | ||
| public function differentiate() : void | ||
| { | ||
| $this->activationFn->differentiate($this->z); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
benchmarks/NeuralNet/ActivationFunctions/HyperbolicTangent/HyperbolicTangentBench.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| <?php | ||
|
|
||
| namespace Rubix\ML\Benchmarks\NeuralNet\ActivationFunctions\HyperbolicTangent; | ||
|
|
||
| use NDArray; | ||
| use NumPower; | ||
| use Rubix\ML\NeuralNet\ActivationFunctions\HyperbolicTangent\HyperbolicTangent; | ||
|
|
||
| /** | ||
| * @Groups({"ActivationFunctions"}) | ||
| * @BeforeMethods({"setUp"}) | ||
| */ | ||
| class HyperbolicTangentBench | ||
| { | ||
| /** | ||
| * @var NDArray | ||
| */ | ||
| protected NDArray $z; | ||
|
|
||
| /** | ||
| * @var NDArray | ||
| */ | ||
| protected NDArray $computed; | ||
|
|
||
| /** | ||
| * @var HyperbolicTangent | ||
| */ | ||
| protected HyperbolicTangent $activationFn; | ||
|
|
||
| public function setUp() : void | ||
| { | ||
| $this->z = NumPower::uniform([500, 500], low: -1.0, high: 1.0); | ||
|
|
||
| $this->computed = NumPower::uniform([500, 500], low: -1.0, high: 1.0); | ||
|
|
||
| $this->activationFn = new HyperbolicTangent(); | ||
| } | ||
|
|
||
| /** | ||
| * @Subject | ||
| * @Iterations(3) | ||
| * @OutputTimeUnit("milliseconds", precision=3) | ||
| */ | ||
| public function activate() : void | ||
| { | ||
| $this->activationFn->activate($this->z); | ||
| } | ||
|
|
||
| /** | ||
| * @Subject | ||
| * @Iterations(3) | ||
| * @OutputTimeUnit("milliseconds", precision=3) | ||
| */ | ||
| public function differentiate() : void | ||
| { | ||
| $this->activationFn->differentiate($this->computed); | ||
| } | ||
| } |
58 changes: 58 additions & 0 deletions
58
benchmarks/NeuralNet/ActivationFunctions/LeakyReLU/LeakyReLUBench.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| <?php | ||
|
|
||
| namespace Rubix\ML\Benchmarks\NeuralNet\ActivationFunctions\LeakyReLU; | ||
|
|
||
| use NDArray; | ||
| use NumPower; | ||
| use Rubix\ML\NeuralNet\ActivationFunctions\LeakyReLU\LeakyReLU; | ||
|
|
||
| /** | ||
| * @Groups({"ActivationFunctions"}) | ||
| * @BeforeMethods({"setUp"}) | ||
| */ | ||
| class LeakyReLUBench | ||
| { | ||
| /** | ||
| * @var NDArray | ||
| */ | ||
| protected NDArray $z; | ||
|
|
||
| /** | ||
| * @var NDArray | ||
| */ | ||
| protected NDArray $computed; | ||
|
|
||
| /** | ||
| * @var LeakyReLU | ||
| */ | ||
| protected LeakyReLU $activationFn; | ||
|
|
||
| public function setUp() : void | ||
| { | ||
| $this->z = NumPower::uniform([500, 500], low: -1.0, high: 1.0); | ||
|
|
||
| $this->computed = NumPower::uniform([500, 500], low: -1.0, high: 1.0); | ||
|
|
||
| $this->activationFn = new LeakyReLU(); | ||
| } | ||
|
|
||
| /** | ||
| * @Subject | ||
| * @Iterations(3) | ||
| * @OutputTimeUnit("milliseconds", precision=3) | ||
| */ | ||
| public function activate() : void | ||
| { | ||
| $this->activationFn->activate($this->z); | ||
| } | ||
|
|
||
| /** | ||
| * @Subject | ||
| * @Iterations(3) | ||
| * @OutputTimeUnit("milliseconds", precision=3) | ||
| */ | ||
| public function differentiate() : void | ||
| { | ||
| $this->activationFn->differentiate($this->z); | ||
| } | ||
| } |
58 changes: 58 additions & 0 deletions
58
benchmarks/NeuralNet/ActivationFunctions/ReLU/ReLUBench.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| <?php | ||
|
|
||
| namespace Rubix\ML\Benchmarks\NeuralNet\ActivationFunctions\ReLU; | ||
|
|
||
| use NDArray; | ||
| use NumPower; | ||
| use Rubix\ML\NeuralNet\ActivationFunctions\ReLU\ReLU; | ||
|
|
||
| /** | ||
| * @Groups({"ActivationFunctions"}) | ||
| * @BeforeMethods({"setUp"}) | ||
| */ | ||
| class ReLUBench | ||
| { | ||
| /** | ||
| * @var NDArray | ||
| */ | ||
| protected NDArray $z; | ||
|
|
||
| /** | ||
| * @var NDArray | ||
| */ | ||
| protected NDArray $computed; | ||
|
|
||
| /** | ||
| * @var ReLU | ||
| */ | ||
| protected ReLU $activationFn; | ||
|
|
||
| public function setUp() : void | ||
| { | ||
| $this->z = NumPower::uniform([500, 500], low: -1.0, high: 1.0); | ||
|
|
||
| $this->computed = NumPower::uniform([500, 500], low: -1.0, high: 1.0); | ||
|
|
||
| $this->activationFn = new ReLU(); | ||
| } | ||
|
|
||
| /** | ||
| * @Subject | ||
| * @Iterations(3) | ||
| * @OutputTimeUnit("milliseconds", precision=3) | ||
| */ | ||
| public function activate() : void | ||
| { | ||
| $this->activationFn->activate($this->z); | ||
| } | ||
|
|
||
| /** | ||
| * @Subject | ||
| * @Iterations(3) | ||
| * @OutputTimeUnit("milliseconds", precision=3) | ||
| */ | ||
| public function differentiate() : void | ||
| { | ||
| $this->activationFn->differentiate($this->z); | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.