Skip to content

feat: add ml/base/sgd/params/* - #13968

Draft
nakul-krishnakumar wants to merge 8 commits into
stdlib-js:developfrom
nakul-krishnakumar:sgd-params
Draft

feat: add ml/base/sgd/params/*#13968
nakul-krishnakumar wants to merge 8 commits into
stdlib-js:developfrom
nakul-krishnakumar:sgd-params

Conversation

@nakul-krishnakumar

Copy link
Copy Markdown
Member

Resolves a part of #12875.

Description

What is the purpose of this pull request?

This pull request:

  • Adds ml/base/sgd/params/factory
  • Adds ml/base/sgd/params/float64
  • Adds ml/base/sgd/params/float32
  • Adds ml/base/sgd/params/to-json
  • Adds ml/base/sgd/params/to-string

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

{{TODO: add disclosure if applicable}}


@stdlib-js/reviewers

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown_pkg_readmes
    status: passed
  - task: lint_markdown_docs
    status: na
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: passed
  - task: lint_repl_help
    status: passed
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: passed
  - task: lint_javascript_tests
    status: passed
  - task: lint_javascript_benchmarks
    status: passed
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: passed
  - task: lint_license_headers
    status: passed
---
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown_pkg_readmes
    status: passed
  - task: lint_markdown_docs
    status: na
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: passed
  - task: lint_repl_help
    status: passed
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: passed
  - task: lint_javascript_tests
    status: passed
  - task: lint_javascript_benchmarks
    status: passed
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: passed
  - task: lint_license_headers
    status: passed
---
@nakul-krishnakumar
nakul-krishnakumar requested a review from a team August 6, 2026 07:07
@nakul-krishnakumar

Copy link
Copy Markdown
Member Author

Currently blocked by #13875.

@nakul-krishnakumar
nakul-krishnakumar marked this pull request as draft August 6, 2026 07:07
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Aug 6, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

No coverage information available.

@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Aug 6, 2026

- **penalty**: regularization function to be used (e.g., `'l1'`, `'l2'`, `'elasticnet'` or `'none'`).

- **penaltyParams**: parameters specific to the regularization function being used as a [`Float32Array`][@stdlib/array/float32].

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.

Suggested change
- **penaltyParams**: parameters specific to the regularization function being used as a [`Float32Array`][@stdlib/array/float32].
- **penaltyParams**: parameters specific to the regularization function being used as a [`Float32Array`][@stdlib/array/float32] of length `2`.


- **penaltyParams**: parameters specific to the regularization function being used as a [`Float32Array`][@stdlib/array/float32].

- When `'penalty = {l1,l2}`, `'penaltyParams' => [ lambda ]`

@kgryte kgryte Aug 6, 2026

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.

Suggested change
- When `'penalty = {l1,l2}`, `'penaltyParams' => [ lambda ]`
- When `'penalty` is either `'l1'` or `'l2'`, the first element of the penalty parameter array should equal `lambda`. Any additional elements are ignored.

You need to also explain what lambda means.

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