Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
emoUS-public
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
dsml
emoUS-public
Commits
c91759e3
Commit
c91759e3
authored
Aug 25, 2020
by
newRuntieException
Committed by
zhuqi
Aug 26, 2020
Browse files
Options
Downloads
Patches
Plain Diff
update
parent
22834b72
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
convlab2/util/analysis_tool/analyzer.py
+6
-6
6 additions, 6 deletions
convlab2/util/analysis_tool/analyzer.py
with
6 additions
and
6 deletions
convlab2/util/analysis_tool/analyzer.py
+
6
−
6
View file @
c91759e3
...
...
@@ -170,9 +170,9 @@ class Analyzer:
logger
.
info
(
'
task success: %.3f
'
,
suc_num
/
(
j
+
1
))
logger
.
info
(
'
book rate: %.3f
'
,
np
.
mean
(
match
))
logger
.
info
(
'
inform precision/recall/f1: %.3f %.3f %.3f
'
,
np
.
mean
(
precision
),
np
.
mean
(
recall
),
np
.
mean
(
f1
))
logging
.
info
(
"
percentage of domains that satisfy the database constraints: %.3f
}
"
%
\
logging
.
info
(
"
percentage of domains that satisfy the database constraints: %.3f
"
%
\
(
1
if
num_domains
==
0
else
(
num_domains_satisfying_constraints
/
num_domains
)))
logging
.
info
(
"
percentage of dialogs that satisfy the database constraints: %.3f
}
"
%
(
num_dialogs_satisfying_constraints
/
(
j
+
1
)))
logging
.
info
(
"
percentage of dialogs that satisfy the database constraints: %.3f
"
%
(
num_dialogs_satisfying_constraints
/
(
j
+
1
)))
domain_set
=
[]
for
da
in
sess
.
evaluator
.
usr_da_array
:
if
da
.
split
(
'
-
'
)[
0
]
!=
'
general
'
and
da
.
split
(
'
-
'
)[
0
]
not
in
domain_set
:
...
...
@@ -207,9 +207,9 @@ class Analyzer:
print
(
'
average book rate:
'
,
np
.
mean
(
match
))
print
(
"
average turn (succ):
"
,
tmp
)
print
(
"
average turn (all):
"
,
turn_num
/
total_dialog
)
print
(
"
percentage of domains that satisfy the database constraints: %.3f
}
"
%
\
print
(
"
percentage of domains that satisfy the database constraints: %.3f
"
%
\
(
1
if
num_domains
==
0
else
(
num_domains_satisfying_constraints
/
num_domains
)))
print
(
"
percentage of dialogs that satisfy the database constraints: %.3f
}
"
%
(
num_dialogs_satisfying_constraints
/
total_dialog
))
print
(
"
percentage of dialogs that satisfy the database constraints: %.3f
"
%
(
num_dialogs_satisfying_constraints
/
total_dialog
))
print
(
"
=
"
*
100
)
print
(
"
complete number of dialogs/tot:
"
,
complete_num
/
total_dialog
,
file
=
f
)
print
(
"
success number of dialogs/tot:
"
,
suc_num
/
total_dialog
,
file
=
f
)
...
...
@@ -219,9 +219,9 @@ class Analyzer:
print
(
'
average book rate:
'
,
np
.
mean
(
match
),
file
=
f
)
print
(
"
average turn (succ):
"
,
tmp
,
file
=
f
)
print
(
"
average turn (all):
"
,
turn_num
/
total_dialog
,
file
=
f
)
print
(
"
percentage of domains that satisfy the database constraints: %.3f
}
"
%
\
print
(
"
percentage of domains that satisfy the database constraints: %.3f
"
%
\
(
1
if
num_domains
==
0
else
(
num_domains_satisfying_constraints
/
num_domains
)),
file
=
f
)
print
(
"
percentage of dialogs that satisfy the database constraints: %.3f
}
"
%
(
num_dialogs_satisfying_constraints
/
total_dialog
),
file
=
f
)
print
(
"
percentage of dialogs that satisfy the database constraints: %.3f
"
%
(
num_dialogs_satisfying_constraints
/
total_dialog
),
file
=
f
)
f
.
close
()
reporter
.
report
(
complete_num
/
total_dialog
,
suc_num
/
total_dialog
,
np
.
mean
(
precision
),
np
.
mean
(
recall
),
np
.
mean
(
f1
),
tmp
,
turn_num
/
total_dialog
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment