9685df29213e5943d2774f80e21564f4204823ec,secuml/core/active_learning/queries/categories.py,Categories,set_category_num_annotations,#Categories#Any#,81

Before Change


    def set_category_num_annotations(self, conf):
        weights = [1 / self.num_categories] * self.num_categories
        num_annotations = conf.num_annotations
        annotations = [None for c in range(self.num_categories)]
        card = [self.categories[c].num_instances() -
                self.categories[c].num_annotated_instances
                for c in range(self.num_categories)]
        if num_annotations > sum(card):

After Change


    def set_category_num_annotations(self, conf):
        weights = np.full((self.num_categories,), 1 / self.num_categories)
        num_annotations = conf.num_annotations
        annotations = np.full((self.num_categories,), None)
        card = [self.categories[c].num_instances() -
                self.categories[c].num_annotated_instances
                for c in range(self.num_categories)]
        sum_card = sum(card)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: ANSSI-FR/SecuML
Commit Name: 9685df29213e5943d2774f80e21564f4204823ec
Time: 2019-09-03
Author: anael.beaugnon@ssi.gouv.fr
File Name: secuml/core/active_learning/queries/categories.py
Class Name: Categories
Method Name: set_category_num_annotations


Project Name: ANSSI-FR/SecuML
Commit Name: 9685df29213e5943d2774f80e21564f4204823ec
Time: 2019-09-03
Author: anael.beaugnon@ssi.gouv.fr
File Name: secuml/core/data/ids.py
Class Name: Ids
Method Name: _set_idents_timetamps


Project Name: ANSSI-FR/SecuML
Commit Name: 9685df29213e5943d2774f80e21564f4204823ec
Time: 2019-09-03
Author: anael.beaugnon@ssi.gouv.fr
File Name: secuml/core/classif/conf/test/cv.py
Class Name: CvConf
Method Name: _gen_cv_split