Skip to content

Fixes for Unresolved comment '# TODO: remove placeholding zeroed y' and Unresolved comment '# TODO: add float values'. #172

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

Closed
wants to merge 2 commits into from

Conversation

ashageor
Copy link

@ashageor ashageor commented Mar 7, 2025

Fixes for Unresolved comment '# TODO: remove placeholding zeroed y' in sklbench\datasets\loaders.py:804 and Unresolved comment '# TODO: add float values'. in sklbench\utils\special_params.py:48

Description

Fixes in Unresolved comment '# TODO: remove placeholding zeroed y'. lines of code = 1 in sklbench\datasets\loaders.py:804

Originally it was like y = np.zeros((x.shape[0],))
Changed it to y = np.zeros(x.shape[0])
image

Fixes in Unresolved comment '# TODO: add float values'. lines of code = 1 in Found in [sklbench\utils\special_params.py:48]
I added a function in special_params.py called def float_range(start,stop,step) to accept float values
I tested it in Python:

import sklbench.utils.special_params as spl
spl.explain_range('[RANGE]add:1:5:1')
[1.0, 2.0, 3.0, 4.0, 5.0]
spl.explain_range('[RANGE]add:1.1:5.1:.2')
[1.1, 1.3, 1.5, 1.7, 1.9, 2.1, 2.3000000000000003, 2.5000000000000004, 2.7000000000000006, 2.900000000000001, 3.100000000000001, 3.300000000000001, 3.5000000000000013, 3.7000000000000015, 3.9000000000000017, 4.100000000000001, 4.300000000000002, 4.500000000000002, 4.700000000000002, 4.900000000000002, 5.100000000000002]
spl.explain_range('[RANGE]mul:1.1:5.1:.2')
However for the geometric progression, make sure the step value is greater than 1 as the result gets progressively smaller and will never converge. We can do a comparison for step size to be greater than 1 (currently not implemented)
spl.explain_range('[RANGE]mul:1.1:5.1:2')
[1.1, 2.2, 4.4]
spl.explain_range('[RANGE]pow:1.1:5.1:2')
[]
spl.explain_range('[RANGE]pow:1.1:10:2')
[]
spl.explain_range('[RANGE]pow:0.2:1.1:5.1:2')
[0.1702679845041569, 0.006810719380166277, 0.00027242877520665133]


PR should start as a draft, then move to ready for review state after CI is passed and all applicable checkboxes are closed.
This approach ensures that reviewers don't spend extra time asking for regular requirements.

You can remove a checkbox as not applicable only if it doesn't relate to this PR in any way.

Checklist to comply with before moving PR from draft:

PR completeness and readability

  • I have reviewed my changes thoroughly before submitting this pull request.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes or created a separate PR with update and provided its number in the description, if necessary.
  • Git commit message contains an appropriate signed-off-by string (see CONTRIBUTING.md for details).
  • I have added a respective label(s) to PR if I have a permission for that.
  • I have resolved any merge conflicts that might occur with the base branch.

Testing

  • [X ] I have run it locally and tested the changes extensively.
  • All CI jobs are green or I have provided justification why they aren't.
  • I have extended testing suite if new functionality was introduced in this PR.

ashageor and others added 2 commits March 5, 2025 16:31
Updating code from the main repo
… and Unresolved comment '# TODO: add float values'. lines of code = 1
@ashageor ashageor requested a review from Alexsandruss as a code owner March 7, 2025 00:09
@ashageor ashageor marked this pull request as draft March 7, 2025 00:12
@ashageor ashageor closed this Mar 7, 2025
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.

1 participant