зеркало из https://github.com/mozilla/bugbug.git
Log number of spam/non-spam bugs when training the SpamBug model (#1214)
Fixes #1201 Co-authored-by: Marco Castelluccio <mcastelluccio@mozilla.com>
This commit is contained in:
Родитель
1752c8ed25
Коммит
40e6221b4a
|
@ -85,6 +85,17 @@ class SpamBugModel(BugModel):
|
|||
):
|
||||
classes[bug_id] = 1
|
||||
|
||||
print(
|
||||
"{} bugs are classified as non-spam".format(
|
||||
sum(1 for label in classes.values() if label == 0)
|
||||
)
|
||||
)
|
||||
print(
|
||||
"{} bugs are classified as spam".format(
|
||||
sum(1 for label in classes.values() if label == 1)
|
||||
)
|
||||
)
|
||||
|
||||
return classes, [0, 1]
|
||||
|
||||
def items_gen(self, classes):
|
||||
|
|
Загрузка…
Ссылка в новой задаче