Ensure that numberic values are between 0 and 1
See original GitHub issueHello,
To use Brain.js, I need to convert numeric values to 0 and 1. But I haven’t found a good solution to convert numeric values from large files. For example, I struggle with this dataset:
"Channel": 2,
"Region": 3
"Fresh": 12669,
"Milk": 9656,
"Grocery": 7561,
"Frozen": 214,
"DetergentsPaper": 2674,
"Delicassen": 1338
Sometimes, I read that people divide values by 10, 100 or 1000, but I doubt it’s a relevant solution. Do you have ideas ?
Thank you,
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to represent an unbounded variable as number between ...
The variable is a non-negative integer with no inherent bound. I map 0 to 0 but what can I map to 1 or...
Read more >How to Normalize Data Between 0 and 1 - Statology
To normalize the values in a dataset to be between 0 and 1, you can use the following formula: zi = (xi –...
Read more >How would I get a value between 0 and 1 depending on ...
I need to generate a number between 0 and 1 (used for opacity) that accurately reflects numbers on this scale:.
Read more >Scale Data to Range Between Two Values in R (4 Examples)
Example 3: Convert Values to 0/1 Range Using scales Package. This example explains how to use the scales package to convert numerical values...
Read more >Check if a numeric value falls between a range in R ...
between() function in R Language is used to check that whether a numeric value falls in a specific range or not.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think what Robert was suggesting was to find the largest value for each thing beforehand. Snippet:
That will ensure that each value is between 0 and 1, and that the largest value for each property is exactly 1.
Great! Closing this issue, please feel free to open if you need any further help.