Repository navigation
feat: add ml/base/loss/float32/squared-epsilon-insensitive-gradient - #16358
Harsh28-raj wants to merge 2 commits into
Conversation
Ref: stdlib-js#16124 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
👋 Hi there! 👋 And thank you for opening your first pull request! We will review it shortly. 🏃 💨 Getting Started
Next Steps
Running Tests LocallyYou can use # Run tests for all packages in the math namespace:
make test TESTS_FILTER=".*/@stdlib/math/.*"
# Run benchmarks for a specific package:
make benchmark BENCHMARKS_FILTER=".*/@stdlib/math/base/special/sin/.*"If you haven't heard back from us within two weeks, please ping us by tagging the "reviewers" team in a comment on this PR. If you have any further questions while waiting for a response, please join our Zulip community to chat with project maintainers and other community members. We appreciate your contribution! Documentation Links |
AryanSharma48
left a comment
There was a problem hiding this comment.
Left some initial suggestions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @AryanSharma48! Applied all four suggestions in f70442d. For the docstring p example, I kept the original range( 10.0, stop=0.0, ... ) and only wrapped it in Float32.( ... ), matching #16317, since I think the 0.0 → 50.0 in the suggestion was a copy slip. Let me know if you meant otherwise. |
Description
This pull request:
@stdlib/ml/base/loss/float32/squared-epsilon-insensitive-gradient, a single-precision port of@stdlib/ml/base/loss/float64/squared-epsilon-insensitive-gradient, with JavaScript and C implementations.Related Issues
This pull request has the following related issues:
Reference Packages
This pull request followed these packages:
ml/base/loss/float64/squared-epsilon-insensitive-gradientml/base/loss/float32/epsilon-insensitive-gradient(feat: addml/base/loss/float32/epsilon-insensitive-gradient#16317)ml/base/loss/float32/epsilon-insensitive-gradient#16317:f32rounding of inputs and intermediate results in JS,floattypes andf-suffixed literals in C,isnanf,STDLIB_CONSTANT_FLOAT32_NAN, theFFFF_FN-API macro, a 1 ULP tolerance in tests, and the additionalNaNtests foryandp.y - p,z ± e, and the final product are each rounded to single precision to match the C kernel's float arithmetic.-76.8example is no longer exact in single precision, so it is documented as~-76.8.runner.jlwas updated to compute inFloat32. Julia was not available locally, so the fixture JSON files were generated by a Node.js script that mirrors the updatedrunner.jl, applyingMath.froundafter every operation.Questions
Other
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written primarily by Claude Code, by porting the existing float64 package and following the float32 conventions in #16317. I reviewed the changes and ran the JavaScript tests locally.
@stdlib-js/reviewers