Skip to content

Commit

Permalink
Add min/max value constraints to score and confidence slots. (#373)
Browse files Browse the repository at this point in the history
Resolves #372

- [ ] `docs/` have been added/updated if necessary (not applicable; the
doc was already ahead of the model, this PR is about updating the model
to align it with the doc)
- [x] `make test` has been run locally
- [ ] tests have been added/updated (not applicable)
- [x]
[CHANGELOG.md](https://github.com/mapping-commons/sssom/blob/master/CHANGELOG.md)
has been updated.

The description of the `confidence`, `semantic_similarity_score`, and
`similarity_score` slots says that those slots expect a value between 0
and 1, but the model does not enforce that. LinkML provides a way to
formalise this kind of value constraints (which could then be
automatically enforced by a runtime that is aware of those constraints),
so we do exactly that here: we add `minimum_value` and `maximum_value`
constraints to the aforementioned slots.
  • Loading branch information
gouttegd authored Jul 19, 2024
1 parent 0af8c6f commit 73bffc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
## SSSOM version 0.15.1

- Add recommendation to sort the keys in the YAML metadata block.
- Double-typed slots explicitly constrained to the [0.0,1.0] range, as per their description.

## SSSOM version 0.15.0

Expand Down
6 changes: 6 additions & 0 deletions src/sssom_schema/schema/sssom_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,8 @@ slots:
description: A score between 0 and 1 to denote the confidence or probability that
the match is correct, where 1 denotes total confidence.
range: double
minimum_value: 0.0
maximum_value: 1.0
subject_match_field:
description: A list of properties (term annotations on the subject) that was used
for the match.
Expand Down Expand Up @@ -558,6 +560,8 @@ slots:
description: A score between 0 and 1 to denote the semantic similarity, where
1 denotes equivalence.
range: double
minimum_value: 0.0
maximum_value: 1.0
semantic_similarity_measure:
description: The measure used for computing the the semantic similarity score.
To make processing this field as unambiguous as possible, we recommend using
Expand All @@ -570,6 +574,8 @@ slots:
description: A score between 0 and 1 to denote the similarity, where
1 denotes equivalence.
range: double
minimum_value: 0.0
maximum_value: 1.0
similarity_measure:
description: The measure used for computing the the similarity score.
To make processing this field as unambiguous as possible, we recommend using
Expand Down

0 comments on commit 73bffc3

Please sign in to comment.