-
-
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
base: 3.0
Are you sure you want to change the base?
Changes from 7 commits
556f381
fd987ef
6f648b0
c0fd04f
a9c633a
28ac17d
a201bbf
a63754c
11609bb
2684f5c
cf4378e
0eb5555
70aac8b
f97b99e
676416e
9658a9d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 |
| 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); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,7 @@ | |
| use Rubix\ML\NeuralNet\Optimizers\Adam; | ||
| use Rubix\ML\NeuralNet\Layers\Placeholder1D; | ||
| use Rubix\ML\NeuralNet\Optimizers\Optimizer; | ||
| use Rubix\ML\NeuralNet\Initializers\Xavier1; | ||
| use Rubix\ML\NeuralNet\Initializers\XavierNormal; | ||
| use Rubix\ML\Specifications\DatasetIsLabeled; | ||
| use Rubix\ML\Specifications\DatasetIsNotEmpty; | ||
| use Rubix\ML\Specifications\SpecificationChain; | ||
|
|
@@ -292,7 +292,7 @@ public function train(Dataset $dataset) : void | |
|
|
||
| $this->network = new FeedForward( | ||
| new Placeholder1D($dataset->numFeatures()), | ||
| [new Dense(1, $this->l2Penalty, true, new Xavier1())], | ||
| [new Dense(1, $this->l2Penalty, true, new XavierNormal())], | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. XavierNormal is not equivalent to Xavier1 which samples from a uniform distribution.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed with using Xavier1Uniform |
||
| new Binary($classes, $this->costFn), | ||
| $this->optimizer | ||
| ); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,7 @@ | |
| use Rubix\ML\CrossValidation\Metrics\FBeta; | ||
| use Rubix\ML\NeuralNet\Layers\Placeholder1D; | ||
| use Rubix\ML\NeuralNet\Optimizers\Optimizer; | ||
| use Rubix\ML\NeuralNet\Initializers\Xavier1; | ||
| use Rubix\ML\NeuralNet\Initializers\XavierNormal; | ||
| use Rubix\ML\CrossValidation\Metrics\Metric; | ||
| use Rubix\ML\Specifications\DatasetIsLabeled; | ||
| use Rubix\ML\Specifications\DatasetIsNotEmpty; | ||
|
|
@@ -369,7 +369,7 @@ public function train(Dataset $dataset) : void | |
|
|
||
| $hiddenLayers = $this->hiddenLayers; | ||
|
|
||
| $hiddenLayers[] = new Dense(count($classes), 0.0, true, new Xavier1()); | ||
| $hiddenLayers[] = new Dense(count($classes), 0.0, true, new XavierNormal()); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. XavierNormal is not equivalent to Xavier1 which samples from a uniform distribution.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed with using Xavier1Uniform |
||
|
|
||
| $this->network = new FeedForward( | ||
| new Placeholder1D($dataset->numFeatures()), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,7 +21,7 @@ | |
| use Rubix\ML\NeuralNet\Layers\Multiclass; | ||
| use Rubix\ML\NeuralNet\Layers\Placeholder1D; | ||
| use Rubix\ML\NeuralNet\Optimizers\Optimizer; | ||
| use Rubix\ML\NeuralNet\Initializers\Xavier1; | ||
| use Rubix\ML\NeuralNet\Initializers\XavierNormal; | ||
| use Rubix\ML\Specifications\DatasetIsLabeled; | ||
| use Rubix\ML\Specifications\DatasetIsNotEmpty; | ||
| use Rubix\ML\Specifications\SpecificationChain; | ||
|
|
@@ -288,7 +288,7 @@ public function train(Dataset $dataset) : void | |
|
|
||
| $this->network = new FeedForward( | ||
| new Placeholder1D($dataset->numFeatures()), | ||
| [new Dense(count($classes), $this->l2Penalty, true, new Xavier1())], | ||
| [new Dense(count($classes), $this->l2Penalty, true, new XavierNormal())], | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. XavierNormal is not equivalent to Xavier1 which samples from a uniform distribution.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed with Xavier1Uniform |
||
| new Multiclass($classes, $this->costFn), | ||
| $this->optimizer | ||
| ); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.