-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
Closed
Closed
Changes from all commits
Commits
Show all changes
155 commits
Select commit
Hold shift + click to select a range
c80d278
ML-396 Converted MLPRegressor to work with NumPower/NDArray related c…
13acae6
ML-396 removed unneeded export function
3b65a47
ML-396 added test for NumPower
d7404f8
ML-396 added USE_NUMPOWER_TRANSPOSE option to Network
d538799
ML-396 added USE_NUMPOWER_TRANSPOSE option to Network
f333c67
ML-396 fixed issue with samples normalization
1583ee3
ML-396 removed unneeded packages from composer
57037c6
ML-396 removed unneeded packages from composer
22df3e0
Merge branch '3.0' into 396-convert-mlp-classifier-to-NumPower
b79ddb6
Merge branch '3.0' into 396-convert-mlp-classifier-to-NumPower
cab6925
Merge branch '3.0' into 396-convert-mlp-classifier-to-NumPower
b920665
ML-396 style fixes
b99d65b
ML-396 migrated MLPRegressor
e04867b
ML-396 migrated MLPRegressor
36a282e
ML-396 migrated MLPRegressor
9bc5107
ML-396 migrated MLPRegressor
2a69709
ML-396 migrated MLPRegressor
76093fd
ML-396 migrated Adaline
0d35e60
ML-396 migrated Adaline
289b822
ML-396 migrated Adaline
4e19926
ML-396 migrated ExtraTreeRegressor with Hyperplane
f18ceaa
ML-396 migrated RegressionTree
f22c58c
ML-396 migrated GradientBoost
8a24b57
ML-396 migrated Ridge
5052675
ML-396 migrated Ridge
4c31a38
ML-396 migrated Ridge
b6f3665
ML-396 Added tests for Ridge
41b144c
ML-396 Added AdalineTest
7017b0f
ML-396 fixes for STAN
60a1100
ML-396 fixes for STAN
cfbd391
ML-396 fixes for Ridge and tests
f730d69
ML-396 fix for ErrorAnalysisTest
a700418
ML-396 fix for ErrorAnalysisTest
320871f
ML-396 fix for tests
5412c79
ML-396 fix for tests
d1e9a6d
ML-396 fix for tests
6016eef
ML-396 fix for tests
2e627c0
ML-396 fix for tests
8cb3a16
ML-396 fix for tests
83d0a63
ML-396 fix for tests
252003c
ML-396 fix for tests
95516c4
ML-396 fix for tests
a932a92
ML-396 fix for tests
17e6bce
ML-396 fix for tests
aa1553b
ML-396 additional tests for ExtraTreeRegressorTest
2b0cbb3
ML-396 additional tests for ExtraTreeRegressorTest
5c79fa1
ML-396 fix for tests
6b1af3d
ML-396 fix for tests
d558360
ML-396 fix for tests
0de66d5
ML-396 additional tests for GradientBoostTest
12aee96
ML-396 additional tests for GradientBoostTest
d79f7a8
ML-396 additional tests for GradientBoostTest
293837c
ML-396 fix for tests
5372b35
ML-396 additional tests for MLPRegressorTest
61f8204
ML-396 additional tests for RegressionTreeTest
43a6c97
ML-396 fix for tests
e396c04
ML-396 RadiusNeighborsRegressor migrated to NumPower
c7e6448
ML-396 fix for tests
e8197a9
ML-396 fix for tests
3d92727
ML-396 fix for tests
080006a
ML-396 fix for tests
adb2d51
ML-396 fix for tests
67673cc
ML-396 fix for tests
02ca4eb
ML-396 fix for tests
84bc347
ML-396 KNNRegressor migrated to NumPower
72f08e7
ML-396 KDNeighborsRegressor migrated to NumPower
bd0c461
ML-396 KDNeighborsRegressor migrated to NumPower
0a395a4
ML-396 added DataProviderExternal to RidgeTest
7e64e6f
ML-396 removed unused imports
42664e1
ML-396 SVR migrated to dedicated namespace and updated dependencies
2cc5ff4
ML-396 minor code style fixes
269d17f
ML-396 added determinant test with DataProvider to NumPowerTest
eaede75
ML-396 updated @var annotation for params in SVR class
aac88da
ML-396 removed unneeded debug
a49cc3e
ML-396 removed unneeded debug
e179684
ML-396 added validation for empty ensemble, cleaned dependencies, upd…
9daa783
ML-396 fixed regex pattern in PHPStan baseline to escape '#' properly
75636f8
ML-396 updated changelog with array_pack function and NDArray migrati…
b1289eb
ML-396 added tests for array_pack function, extended its functionalit…
f675d0f
ML-396 updated PHPStan baseline and refined annotations for array_pac…
6193dae
ML-396 restored test cases for array_pack and adjusted return type de…
8036cbd
ML-396 added ELU benchmark tests and enforced strict type annotations…
4d041f3
ML-396 added GELUBench benchmark tests
d69c40a
ML-396 changed computed with activate in GELUBench
46ba110
ML-396 added LeakyReLUBench benchmark tests
8606a44
ML-396 added AdalineBench benchmark tests
e5d3a13
ML-396 added ExtraTreeRegressorBench benchmark tests
e4717dc
ML-396 added ReLUBench benchmark tests
cd94934
ML-396 added SELUBench benchmark tests
a0abae9
ML-396 added SigmoidBench benchmark tests
85cf6e8
ML-396 added SiLUBench benchmark tests
5372410
ML-396 added SoftPlusBench benchmark tests
b4b57f1
ML-396 improved Softmax::differentiate
fe9a0ee
ML-396 added SoftmaxBench benchmark tests
ab1336d
ML-396 added GradientBoostBench benchmark tests
08f4935
ML-396 converted Blob generator to work with NDArray
83d69c6
ML-396 code style fix
672ea2e
ML-396 added SoftPlusBench benchmark tests
abd0ba7
ML-396 added SoftsignBench benchmark tests
4b3379f
ML-396 added ThresholdedReLUBench benchmark tests
b002bd4
ML-396 added KDNeighborsRegressorBench benchmark tests
f69abf9
ML-396 added KNNRegressorBench benchmark tests
9f0e753
ML-396 migrated Agglomerate dataset to NDArray
a07b170
ML-396 migrated Agglomerate dataset to NDArray
5f588dd
ML-396 added 10000 benchmark tests
8a20671
ML-396 added RadiusNeighborsRegressorBench benchmark tests
2a9bd5b
ML-396 added RegressionTreeBench benchmark tests
d42a559
ML-396 added RidgeBench benchmark tests
a620663
ML-396 added SVRBench benchmark tests
7dc7916
ML-396 Temporary fix for NumPower::array() 2nd parameter
02da7c5
ML-396 Temporary fix for NumPower::array() 2nd parameter
dcce7a4
ML-396 Temporary fix for new version of NumPower and minor syntax fix…
606589a
ML-396 Fixed tests dataprovider check values
e6312a9
ML-396 Fixed Agglomerate $weight prop to original array typt
96a9f60
ML-396 Fixed signature of first param in NumPower::uniform and NumPow…
fc4615e
ML-396 Fixed signature of first param in NumPower::uniform
026e458
ML-396 added exclusion for argument.type warning in KNearestNeighbors…
5969c95
ML-396 changed initializer sampling from NumPower::truncatedNormal to…
f0d5523
ML-396 changed initializer sampling from NumPower::truncatedNormal to…
83017fe
ML-396 added Standard deviation shrink factor to TruncatedNormal
f20d657
ML-396 removed Standard deviation shrink factor to TruncatedNormal
1c453d4
ML-396 turned back exclusion to array_count_values in KNearestNeighbo…
fa270dd
ML-396 refactoring TruncatedNormalTest
3bc982b
ML-396 updated RidgeProvider
22cbdb1
ML-396 updated RidgeProvider
f807756
ML-396 refactored Circle generator to NumPower
a1cea51
ML-396 reverted to Matrix usage KDNeighborsRegressor, KNNRegressor an…
140a2c0
ML-396 replaced old classes with new for AdalineBench
de02f53
ML-396 replaced old classes with new for ExtraTreeRegressor
31214ad
ML-396 replaced old classes with new for GradientBoost
df521a7
ML-396 replaced old classes with new for MLPRegressor
1067d2f
ML-396 replaced old classes with new for RadiusNeighborsRegressor
312948f
ML-396 replaced old classes with new for Ridge
74d9833
ML-396 replaced old classes with new for Ridge
6e31689
ML-396 replaced old classes with new for SVRBench
1c5b3d3
ML-396 replaced old classes with new for Agglomerate
a67a941
ML-396 replaced old classes with new for Agglomerate
9f6123a
ML-396 replaced old classes with new for Agglomerate
543fc96
ML-396 replaced old classes with new for Blob
042d1ea
ML-396 replaced old classes with new for Circle
1a5940d
ML-396 replaced old classes with new for Hyperplane
8acf3cd
ML-396 replaced old classes with new for SwissRoll
a0194e1
ML-396 stabilized SparseRandomProjectorTest and GridSearchTest
394d4b9
ML-396 stabilized SparseRandomProjectorTest and GridSearchTest
037d7ae
ML-396 stabilized RadiusNeighborsTest and DBSCANTest
ce12de9
ML-396 stabilized KMeans and DBSCANTest
61116c5
ML-396 stabilized VantageTreeTest
0624dd8
ML-396 stabilized TruncatedNormalTest and BallTreeTest
128f31f
ML-396 stabilized TruncatedNormalTest and VantageTreeTest
a1d5330
ML-396 stabilized GaussianMixtureTest and RidgeProvider
97a3348
ML-396 stabilized GaussianMixtureTest and RidgeProvider
b58fea1
ML-396 stabilized GaussianMixtureTest and RidgeProvider
78897fe
Merge branch '3.0' into 396-convert-regressors-to-num-power
b0347c5
ML-396 fixed class path, missing imports after merge with branch 3.0
d0804d4
ML-396 fixed class path, missing imports after merge with branch 3.0
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
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; | ||
|
|
||
| use NDArray; | ||
| use NumPower; | ||
| use Rubix\ML\NeuralNet\ActivationFunctions\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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| <?php | ||
|
|
||
| namespace Rubix\ML\Benchmarks\NeuralNet\ActivationFunctions; | ||
|
|
||
| use NDArray; | ||
| use NumPower; | ||
| use Rubix\ML\NeuralNet\ActivationFunctions\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); | ||
| } | ||
| } |
58 changes: 58 additions & 0 deletions
58
benchmarks/NeuralNet/ActivationFunctions/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; | ||
|
|
||
| use NDArray; | ||
| use NumPower; | ||
| use Rubix\ML\NeuralNet\ActivationFunctions\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/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; | ||
|
|
||
| use NDArray; | ||
| use NumPower; | ||
| use Rubix\ML\NeuralNet\ActivationFunctions\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); | ||
| } | ||
| } |
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; | ||
|
|
||
| use NDArray; | ||
| use NumPower; | ||
| use Rubix\ML\NeuralNet\ActivationFunctions\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); | ||
| } | ||
| } |
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; | ||
|
|
||
| use NDArray; | ||
| use NumPower; | ||
| use Rubix\ML\NeuralNet\ActivationFunctions\SELU; | ||
|
|
||
| /** | ||
| * @Groups({"ActivationFunctions"}) | ||
| * @BeforeMethods({"setUp"}) | ||
| */ | ||
| class SELUBench | ||
| { | ||
| /** | ||
| * @var NDArray | ||
| */ | ||
| protected NDArray $z; | ||
|
|
||
| /** | ||
| * @var NDArray | ||
| */ | ||
| protected NDArray $computed; | ||
|
|
||
| /** | ||
| * @var SELU | ||
| */ | ||
| protected SELU $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 SELU(); | ||
| } | ||
|
|
||
| /** | ||
| * @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.