Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
nlp
ahisto-modules
Named Entity Recognition Experiments
Commits
d167b7be
Commit
d167b7be
authored
Sep 19, 2022
by
Vít Novotný
Browse files
Do not expect `category_map` to know all categories in `GROUPS.values()`
parent
b400288e
Pipeline
#147292
passed with stage
in 9 minutes and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ahisto_named_entity_search/recognition/evaluator.py
View file @
d167b7be
...
...
@@ -53,7 +53,12 @@ class AggregateMeanFScoreEvaluator(TokenClassificationEvaluator):
def
get_f_score
(
self
,
group
:
Group
,
expected_labels
:
List
[
Category
],
actual_labels
:
List
[
Category
])
->
FScore
:
expected_categories
:
Set
[
Category
]
=
{
self
.
category_map
[
category
]
for
category
in
group
}
expected_categories
:
Set
[
Category
]
=
{
self
.
category_map
[
category
]
for
category
in
group
if
category
in
self
.
category_map
}
true_positives
,
false_positives
,
false_negatives
=
0
,
0
,
0
for
expected_label
,
actual_label
in
zip_equal
(
expected_labels
,
actual_labels
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment