I’m currently facing a problem with the Range Slider Filter Definition node.
I’m using this node to create a range of values for a certain variable in my workflow. I feed this node with a column with values of the type double from 0.90 to 0.99 in steps of 0.01. When I execute it, by pressing “Execute and Open Views”, I choose the values to be between 0.97 to 0.99. When I inspect the filter output, the node shows me the attached image.
This problem in the filter makes my values go from 0.98 to 0.99.
I should also add that I’ve noticed this problem happens with the values 0.97 and 0.98 but it doesn’t happen for the value 0.99 (both for minimum and maximum values).
Is there a way for me to correct this?
Thanks in advance.
By default, the number of decimal places for the slider is set to 2, but you can change this. If you check the Slider tab, you will see a Format Options button, which will then lead to the Decimal digits button:
I can’t be sure but it seems to me that the “Decimal digits” drop down menu inside the “Format Options” will only change what I can see on the visualization of the slider itself and do nothing about the variables precision. I say this because I followed your suggestion and obtained the same result. I tried going to the maximum precision allowed (which is 7) and it still didn’t solve the issue. The only thing it did was show more digits in the slider visualization just as it did on the image you kindly provided.
I have tried to reproduce it but was unsuccessful. Seems to me that for whatever reason node adds smallest number possible (0.0000000000000001) to minimum value in order for that value to be excluded but this is just a guess. Is there a possibility for you to share an example workflow with dummy data where this behavior can be seen? This would be very helpful in further investigation.
tnx for the workflow. I see it now but have to say it does not affect my results (doesn’t mean it is ok). Check workflow attached where I added Table View and encapsulated both nodes into Component. range_slider_filter_definition_forum.knwf (12.7 KB)
If I got you right you said it affects your results?
Thanks for the help. I think that in your workflow you don’t find a problem because you don’t use the second output of the node. In my case I use a “filter apply” which uses this output to filter the table values.
Check this workflow to see the problem: range_slider_filter_definition_forum.knwf (8.8 KB)
In that workflow I use the slider to filter values from 0.97 to 0.99. In the table which comes form the “Filter Apply” node I should obtain the values 0.97, 0.98 and 0.99. Yet, because of that rounding error, I only obtain the values 0.98 and 0.99 as you can see in this image:
We actually fixed a bug related to that node in 4.0.2 - in particular, with the filter definition not passing its values out of the model port correctly. Is it possible for you to update to 4.0.2 to see if your problem still persists?
I’ve updated my KNIME Analytics Platform from the version 4.0.1 to the version 4.0.2, tested the workflow I previously sent and the problem I mentioned still persists.