-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
request for open value ranges #330
Comments
3.) would be best, but I understand the issue. If we need it asap, then I would go for 2.) and not for 1.) |
what about having a value set for this purpose in the QuantitativeValueRange schema, so you can set minimum value 18, maximum value of "undefined" or "right-censored-data" or some other term you would find appropriate? It might make sense for other kind of range where the maximum is only the maximum we are looking at (example max time to find a platform in a water maze experiment) |
I really prefer option 3 too.
Dose it cause a problem with generator ? |
@Peyman-N & @jcolomb thanks for the suggestion but the problem here is that you have to defined it for both ranges which could then lead to the following: (infinity to infinity), (undefined to undefined), (undefined to infinity). With the "one-off" option, I meant a schema definition where you have to state either a minValue, or a maxValue or both which I think is not possible at the moment. |
And: string OR number will cause issues with editors (at least at the moment with the KG Editor) |
We can move the "oneOf" to a higher level. Meaning having only three options. But for "string OR number", it depends on the KG language, in python a float value can be 'inf'. |
@Peyman-N I don't now what you mean. You cannot define a oneOf (etc) for properties. Only for values. And we would need it for properties, specifically for stating the requirement of properties. |
I meant something like this:
|
@Peyman-N the "required" does not fit with this schema and "anyOf" would be an actual property name not a technical option. Each "anyOf" option has to be value (which could be a number, string etc or an object). But the way you stated it in the example is incorrect I think. |
Please prove me wrong though 😅 it would be great if it would be an easy implementation but from what I looked at it doesn't work (at the moment). |
hahahaha, I think it works as intended, I checked the following schema with a JSON Schema Validator and it works as intended.
for the following instance pass the test:
and following instance too:
but following instance don't meet the requirements
Beside this, I cheeked the documentation it states the following:
So logically this should work. |
It might be worth looking at different use cases and why the requirement. It relates to the fact that "infinite" and "undefined" are different values, (as are minimum value by design and minimal values by chance). It seems people want to indicate that the study was designed with participants 18 and above, which is something different than indicating the range of ages (more or less by chance) the study had (in that latter case, they would be able to indicate the upper range too.) If we take data from a water maze example, the range of the data "time to find the platform" is 0-300s (usually), with NA indicating the platform was never found. People would then indicate that range (0-300) even for dataset where 300 (and 0) is actually never reached. I think there are different problems, which might require different solution ?
|
@Peyman-N sorry yes you are correct but in the end this is exactly what I said: the oneOf (etc) option only works on whole objects or simple values. You are defining three different objects/schemas within one object in your case (and if we do that we can also go with option 2) not defining at least specify one of the required properties. You're suggestion will be also highly difficult to interpret for editors such as the KG Editor (I just spoke with Oli). What I meant with option 3 was something like this (which is currently not supported): {
"_type": "https://openminds.ebrains.eu/core/QuantitativeValueRange",
"required": {
"oneOf": [
["maxValue", "minValue"],
["maxValue"],
["minValue"]
],
"properties": {
"maxValue": {
"type": "number",
"_instruction": "Add the maximum value measured for this range."
},
"minValue": {
"type": "number",
"_instruction": "Add the minimum value measured for this range."
},
"unit": {
"_instruction": "Add the unit of measurement of this quantitative value range.",
"_linkedTypes": [
"https://openminds.ebrains.eu/controlledTerms/UnitOfMeasurement"
]
}
}
} @jcolomb I completely agree that "undefined" and "infinity" are different use cases. why an option range is need we cannot say beforehand, this is use case dependent. from the openMINDS perspective I would like to leave the why for the user to define in "additional remarks". I don't necessarily would like to cover all cases structurally. Taking @jcolomb point into account option 2 might actually be the best solution, because we could add a property "remark" (optional) for cases where the reason for the open range needs further explanations. |
I see, so let's go with option 2. |
For the name, I would use unbounded instead of open, as "open" is used to say the limit is included in the interval : |
@jcolomb yes that is a good point. QuantitativeValueRangeUnbounded is very long... but that is unavoidable in that case. |
@HumanBrainProject/openminds-developers we frequently get the request to allow for open ranges specifically for age information.
E.g. indication that all participants were at least 18 years old or older.
I see three options how we can solve this within the schemas:
What do you think? (comments from outside of the openMINDS development team are of course also welcome)
The text was updated successfully, but these errors were encountered: