A word for a value between 0 and 1 (inclusive)
181–190 of 325 posts
Re: A word for a value between 0 and 1 (inclusive)
#182I 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…
Unfortunately, creating a constrained type like this isn't easy (or even doable) in all programming languages. Fortunately, my preferred programming language, Raku, makes creating this sort of subset trivially easy[0]: subset UnitInterval of Real where 0 ≤ * ≤ 1 [0]: https://docs.raku.org/language/typesystem#index-entry-subset...
Re: A word for a value between 0 and 1 (inclusive)
#183Shoot. 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?
Re: A word for a value between 0 and 1 (inclusive)
#184I 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"…
you have a very valid point but it would come across even more effectively without that part, i believe.
Re: A word for a value between 0 and 1 (inclusive)
#185Earlier quoted context omitted.
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"…
I'm genuinely sorry if I came across as condescending, that was not my intention at all. I merely wanted to point out that, in my opinion, this property should be reflected in parameter type, rather than the name. Just like, if we wanted a parameter that should only be a whole number, we wouldn't declare it as a float and name it "MyVariableInteger" and hope that the callers would only send integers. You mentioned th…
To avoid that, you need to document that the value should be between 0 and 1, and you could do that with a comment line (which the OP wanted to avoid), or by naming the variable or type appropriately: And that takes us back to the original question. (Whether the concept is expressed in the parameter name or parameter type (and its name) is secondary.)
Re: A word for a value between 0 and 1 (inclusive)
#186Does anyone know of a good site for these kind of questions other than the English stack exchange. I frequently run into programming related naming issues (who doesn't eh?). But I struggle to find accurate search terms to help answer them...and the results are usually downed out by non-technical related language Q&A's E.g. I was trying to name a table yesterday that would store events related to boxes, pallets, conta…
I use Power Thesaurus[1], which is crowd-sourced and frequently has words that are well suited to technical use-cases. In your case, I looked at synonyms for "containers" and found some likely candidates such as "holders" or "receptacles", so `receptacle_events`. [1] https://powerthesaurus.com/
Re: A word for a value between 0 and 1 (inclusive)
#187Re: A word for a value between 0 and 1 (inclusive)
#188Earlier quoted context omitted.
One problem with the word normalised is that it implies that there is some true original value from before normalisation that isn't necessarily between 0 and 1. Of course if that's true then the word is ideal, but if not then it's confusing.
Genuine question, i'm no math expert: if you're using the value by multiplying it with some other value, does that not imply it qualifies as normalised? i.e. say you have a width of 500 and you want to move half way across so you have this value of 0.5 to get 250. By dividing 250 by 500, aren't we in fact normalising it?
Re: A word for a value between 0 and 1 (inclusive)
#189Earlier quoted context omitted.
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?
Looked it up, and a 'perunage' is defined as 'a percentage divided by a hundred'.
Re: A word for a value between 0 and 1 (inclusive)
#190Earlier quoted context omitted.
There are many ways to represent 1, but it’s still 1.
It’s 1, but is it a mantissa? The linked Wikipedia article just says that the mantissa is “the fractional part.”
Hence the fractional part is always less than 1. Since 0.999... = 1, it is not less than 1, so cannot be the fractional part of any number.