-
-
Notifications
You must be signed in to change notification settings - Fork 193
396 convert regressors to num power 1 #416
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
Merged
apphp
merged 20 commits into
RubixML:3.0
from
apphp:396-convert-regressors-to-num-power-1
Jul 22, 2026
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
556f381
ML-396 migrate Regressors to NumPower
fd987ef
ML-396 stan check commented in git actions
6f648b0
ML-396 added rule to phpcs to remove wornings on new_with_parentheses
c0fd04f
ML-396 restored files structure for phpstan
a9c633a
ML-396 phpcs fix for Benchmarks\Regressors
28ac17d
ML-396 phpcs fix for docs\Regressors
a201bbf
ML-396 fix renamed Xavier1 to XavierNormal
a63754c
ML-396 reverted changes in AdalineBench for RuntimeException
11609bb
ML-396 renamed XavierUniform into Xavier1Uniform
2684f5c
ML-396 fixed NumPower::truncatedNormal() signature
cf4378e
ML-396 fixed Xavier1Uniform toString value
0eb5555
ML-396 added Xavier2Uniform
70aac8b
ML-396 refactored usage of packSamples with global function array_pack
f97b99e
ML-396 refactored usage of packSamples with global function array_pack
676416e
ML-396 refactored usage of packSamples with global function array_pack
9658a9d
ML-396 refactored usage of packSamples with global function array_pack
3ad90a4
ML-396 improved RidgeTest with different types of tests
b1fb057
Remove unused depth and maxDepth parameters from array_pack function
samuel-akopyan e9c4258
ML-396 add Xavier2Normal, rename XavierNormal to Xavier1Normal, and u…
samuel-akopyan 525887e
ML-396 refactoring array_pack
samuel-akopyan 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
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
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,17 @@ | ||
| <span style="float:right;"><a href="https://github.com/RubixML/ML/blob/master/src/NeuralNet/Initializers/Xavier1Normal.php">[source]</a></span> | ||
|
|
||
| # Xavier 1 Normal | ||
| The Xavier 1 Normal initializer draws from a truncated normal distribution with mean 0 and standard deviation equal to sqrt(2 / (fanIn + fanOut)). This initializer is best suited for layers that feed into an activation layer that outputs a value between 0 and 1 such as [Softmax](../activation-functions/softmax.md) or [Sigmoid](../activation-functions/sigmoid.md). | ||
|
|
||
| ## Parameters | ||
| This initializer does not have any parameters. | ||
|
|
||
| ## Example | ||
| ```php | ||
| use Rubix\ML\NeuralNet\Initializers\Xavier1Normal; | ||
|
|
||
| $initializer = new Xavier1Normal(); | ||
| ``` | ||
|
|
||
| ## References | ||
| [^1]: X. Glorot et al. (2010). Understanding the Difficulty of Training Deep Feedforward Neural Networks. |
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,17 @@ | ||
| <span style="float:right;"><a href="https://github.com/RubixML/ML/blob/master/src/NeuralNet/Initializers/Xavier1Uniform.php">[source]</a></span> | ||
|
|
||
| # Xavier 1 Uniform | ||
| The Xavier 1 Uniform initializer draws from a uniform distribution [-limit, limit] where *limit* is equal to sqrt(6 / (fanIn + fanOut)). This initializer is best suited for layers that feed into an activation layer that outputs a value between 0 and 1 such as [Softmax](../activation-functions/softmax.md) or [Sigmoid](../activation-functions/sigmoid.md). | ||
|
|
||
| ## Parameters | ||
| This initializer does not have any parameters. | ||
|
|
||
| ## Example | ||
| ```php | ||
| use Rubix\ML\NeuralNet\Initializers\Xavier1Uniform; | ||
|
|
||
| $initializer = new Xavier1Uniform(); | ||
| ``` | ||
|
|
||
| ## References | ||
| [^1]: X. Glorot et al. (2010). Understanding the Difficulty of Training Deep Feedforward Neural Networks. |
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
| <span style="float:right;"><a href="https://github.com/RubixML/ML/blob/master/src/NeuralNet/Initializers/Xavier2Normal.php">[source]</a></span> | ||
|
|
||
| # Xavier 2 Normal | ||
| The Xavier 2 Normal initializer draws from a truncated normal distribution with mean 0 and standard deviation equal to (2 / (fanIn + fanOut)) ** 0.25. This initializer is best suited for layers that feed into an activation layer that outputs values between -1 and 1 such as [Hyperbolic Tangent](../activation-functions/hyperbolic-tangent.md) and [Softsign](../activation-functions/softsign.md). | ||
|
|
||
| ## Parameters | ||
| This initializer does not have any parameters. | ||
|
|
||
| ## Example | ||
| ```php | ||
| use Rubix\ML\NeuralNet\Initializers\Xavier2Normal; | ||
|
|
||
| $initializer = new Xavier2Normal(); | ||
| ``` | ||
|
|
||
| ## References | ||
| [^1]: X. Glorot et al. (2010). Understanding the Difficulty of Training Deep Feedforward Neural Networks. |
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,17 @@ | ||
| <span style="float:right;"><a href="https://github.com/RubixML/ML/blob/master/src/NeuralNet/Initializers/Xavier2Uniform.php">[source]</a></span> | ||
|
|
||
| # Xavier 2 Uniform | ||
| The Xavier 2 Uniform initializer draws from a uniform distribution [-limit, limit] where *limit* is equal to (6 / (fanIn + fanOut)) ** 0.25. This initializer is best suited for layers that feed into an activation layer that outputs values between -1 and 1 such as [Hyperbolic Tangent](../activation-functions/hyperbolic-tangent.md) and [Softsign](../activation-functions/softsign.md). | ||
|
|
||
| ## Parameters | ||
| This initializer does not have any parameters. | ||
|
|
||
| ## Example | ||
| ```php | ||
| use Rubix\ML\NeuralNet\Initializers\Xavier2Uniform; | ||
|
|
||
| $initializer = new Xavier2Uniform(); | ||
| ``` | ||
|
|
||
| ## References | ||
| [^1]: X. Glorot et al. (2010). Understanding the Difficulty of Training Deep Feedforward Neural Networks. |
This file was deleted.
Oops, something went wrong.
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
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,9 @@ | ||
| parameters: | ||
| ignoreErrors: | ||
| # Add here all the errors that you want to ignore | ||
| # ----------------------------------------------- | ||
| # - | ||
| # message: '#^Method Rubix\\ML\\BootstrapAggregator\:\:params\(\) return type has no value type specified in iterable type array\.$#' | ||
| # identifier: missingType.iterableValue | ||
| # count: 1 | ||
| # path: src/BootstrapAggregator.php |
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,25 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| // NumPower dtype names are used as constants across the codebase. | ||
| // During static analysis these constants may not exist, so we define them here | ||
| // to prevent undefined constant errors in PHPStan. | ||
| foreach ([ | ||
| 'float16', | ||
| 'float32', | ||
| 'float64', | ||
| 'int8', | ||
| 'int16', | ||
| 'int32', | ||
| 'int64', | ||
| 'uint8', | ||
| 'uint16', | ||
| 'uint32', | ||
| 'uint64', | ||
| 'bool', | ||
| ] as $dtype) { | ||
| if (!defined($dtype)) { | ||
| define($dtype, $dtype); | ||
| } | ||
| } | ||
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
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.