Shoot. I thought "Proportion" was the One True Correct word, but it's not. Float values between 0 and 1 are very very useful, and I use them all over the place, and I actually thought everyone did (and everyone called them 'Proportions') Unlike percentages, you can just multiply them with the number you want the 'proportion' of, Quick, how do you calculate 20% of 50% of 12345!? (it's (20/100) * (50/100) * 12345) Ok,…
It makes most sense in formulas: Instead of x=(foo/100) * (bar/100) * baz you can do x=foo * bar * baz. Which is rather more readable! Probabilities in statistics are also expressed in this manner. Meanwhile I found out that the Dutch dictionary actually has Perunage for this usage, especially in finance. So maybe that's he term I'll start using?
A word for a value between 0 and 1 (inclusive)
171–180 of 325 posts
Re: A word for a value between 0 and 1 (inclusive)
#172As the logic dealing with {0, 1} is named after its founder George Boole, a boolean or bool for short. I'd suggest we call a fuzzy truth value in the interval of [0,1] after its founder Lotfi A. Zadeh, a zadehan or zade for short. Edit: Fixed Bool to Boole thanks to globular-toast, my internal syntax checker must have auto corrected that one ;)
Re: A word for a value between 0 and 1 (inclusive)
#173Example: FractionInclusive
Re: A word for a value between 0 and 1 (inclusive)
#174Re: A word for a value between 0 and 1 (inclusive)
#175I don't think this is a naming issue at all. In the provided example, 'Accuracy' is the correct name for the parameter, as that's what the parameter represents, accuracy. The fact that accuracy should be given as a value in an interval from 0 to 1 should be a property of parameter type . In other words, the parameter should not be a float, but a more constrained type that allows floats only in [0,1]. EDIT: Some of yo…
Great that you like typed languages, and ones that allow for such constrained/dependent typing as well. It seems disingenuous to me to suggest that anyone using other languages do not have this problem. And really, there are quite a few languages to not have this form of typing, and even some reasons for a language to not want this form of typing. So please, don't answer a question by saying "your questions is wrong"…
The point remains that the fact a given parameter's valid values are [0,1] is not a function of it's name. You can check the values within the method and enter various error states depending on the exact business rules.
Re: A word for a value between 0 and 1 (inclusive)
#176"Normalized". That's what we call data that have been scaled to fit on a tidy axis.
Re: A word for a value between 0 and 1 (inclusive)
#177I don't think this is a naming issue at all. In the provided example, 'Accuracy' is the correct name for the parameter, as that's what the parameter represents, accuracy. The fact that accuracy should be given as a value in an interval from 0 to 1 should be a property of parameter type . In other words, the parameter should not be a float, but a more constrained type that allows floats only in [0,1]. EDIT: Some of yo…
While true, if your language doesn’t support such a type, then the burden for such a name goes to the parameter, does it not?
You'd be surprised where the support is. In C#, you would declare a struct type with one read only field of type double, and range validation (x this is the "value object" pattern. http://wiki.c2.com/?ValueObject
Yes there's a bit of boilerplate - especially since you might want to override equality, cast operators etc. But there is support. And with a struct, not much overhead to it.
Re: A word for a value between 0 and 1 (inclusive)
#178Shoot. I thought "Proportion" was the One True Correct word, but it's not. Float values between 0 and 1 are very very useful, and I use them all over the place, and I actually thought everyone did (and everyone called them 'Proportions') Unlike percentages, you can just multiply them with the number you want the 'proportion' of, Quick, how do you calculate 20% of 50% of 12345!? (it's (20/100) * (50/100) * 12345) Ok,…
Here's another recent HN/Twitter discussion [0] that surprised me and made me think a lot of programmers haven't done much numerical programming.
Re: A word for a value between 0 and 1 (inclusive)
#179Shoot. I thought "Proportion" was the One True Correct word, but it's not. Float values between 0 and 1 are very very useful, and I use them all over the place, and I actually thought everyone did (and everyone called them 'Proportions') Unlike percentages, you can just multiply them with the number you want the 'proportion' of, Quick, how do you calculate 20% of 50% of 12345!? (it's (20/100) * (50/100) * 12345) Ok,…
One of the answers was edited to “portion”, which is the same idea, I think either portion or proportion is elegant and simple. If anyone has been using proportion then I’d stick with that, though portion is nice and succinct.
[1] https://www.dictionary.com/browse/proportion
[2]https://www.merriam-webster.com/dictionary/proportion (3rd. entry)
Re: A word for a value between 0 and 1 (inclusive)
#180"Normalized". That's what we call data that have been scaled to fit on a tidy axis.
(My vote's with "proportion" BTW.)