Skip to content

396 convert regressors to num power 1#416

Merged
apphp merged 20 commits into
RubixML:3.0from
apphp:396-convert-regressors-to-num-power-1
Jul 22, 2026
Merged

396 convert regressors to num power 1#416
apphp merged 20 commits into
RubixML:3.0from
apphp:396-convert-regressors-to-num-power-1

Conversation

@apphp

@apphp apphp commented Jul 7, 2026

Copy link
Copy Markdown

No description provided.

@apphp
apphp requested a review from andrewdalpino July 7, 2026 08:25
@apphp apphp self-assigned this Jul 7, 2026
Comment thread src/Regressors/MLPRegressor.php Outdated
Comment thread src/Regressors/GradientBoost.php Outdated
Comment thread src/Regressors/Adaline.php Outdated
Comment thread src/Classifiers/SoftmaxClassifier.php Outdated
Comment thread src/Classifiers/MultilayerPerceptron.php Outdated
Comment thread src/Classifiers/LogisticRegression.php Outdated
Comment thread src/Regressors/GradientBoost.php Outdated
Comment thread phpstan-bootstrap.php
andrewdalpino
andrewdalpino previously approved these changes Jul 20, 2026

@andrewdalpino andrewdalpino left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a

Comment thread src/NeuralNet/Initializers/Xavier2Uniform.php
@andrewdalpino
andrewdalpino dismissed their stale review July 20, 2026 00:05

Found more potential issues

@andrewdalpino andrewdalpino left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok Xavier2 Uniform looks good. Did you want to add Xavier2 Normal just to match the Xavier1 Normal you added?

Nice work regarding array_pack, I like the idea of building the optimization into the function itself. It handles the case of a semi-packed array, an edge case, but bound to happen to someone - so this approach solves that.

I'm asking about the need for depth arguments in the comments. Let me know what you think.

Comment thread src/functions.php Outdated
@apphp

apphp commented Jul 21, 2026

Copy link
Copy Markdown
Author

Ok Xavier2 Uniform looks good. Did you want to add Xavier2 Normal just to match the Xavier1 Normal you added?

Added, you may check.

@apphp
apphp requested a review from andrewdalpino July 21, 2026 05:26
Comment thread src/functions.php Outdated

return array_map(function ($item) {
if (is_array($item)) {
if (!array_is_list($item)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you copied my example, that's perfectly ok, but I didn't spend any time optimizing it. Could this check and pack block here be removed since it will be called first thing when the function recurses?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right - it's redundant. I removed it.

@apphp
apphp merged commit 2f6d279 into RubixML:3.0 Jul 22, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants