rolling_window_sequences primitive does not support target_size=0
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python
- Domain
- machine-learning
Research direction
Start by locating the Python implementation of the rolling_window_sequences primitive and inspect the loop around X[start:end], X_index.append(index[start]), and y_index.append(index[end]). Verify the target_size=0 behavior against the issue’s expected empty target values and target index, then run the primitive’s relevant tests if available.
Written by the indexing model from the issue text.
Description
The rolling_window_sequences primitive is not allowing a target_size of 0, in which case an out-of-bounds error will be raised for the line y_index.append(index[end]).
The reason is the way we iterate over the arrays, where in the last iteration end is equal to len(index).
However, it would be quite useful to specify target_size=0 in cases where we do not have targets/predictions, but rather only want to create rolling input windows. (Examples would be the CycleGAN primitive or any other reconstruction based models like Autoencoder).
One potential solution would be to check if target_size>0.
...
out_X.append(X[start:end])
X_index.append(index[start])
if target_size>0:
out_y.append(target[end:end + target_size])
y_index.append(index[end])
...
This way we would return an empty arrays for the target values and target index if target_size=0.
- Dominant language
- Python
- Stars
- 70
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MLBazaar/MLPrimitives
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
MLBazaar/MLPrimitives#274 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
MLBazaar/MLPrimitives#270 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
MLBazaar/MLPrimitives#269 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
MLBazaar/MLPrimitives#268 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 50/100
MLBazaar/MLPrimitives#260 ·
All issues in MLBazaar/MLPrimitives
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100