9685df29213e5943d2774f80e21564f4204823ec,secuml/core/data/annotations.py,Annotations,get_annotated_ids,#Annotations#Any#Any#,155
Before Change
return families_prop
def get_annotated_ids(self, label="all", family=None):
annotated_ids = [i for i in self.ids.get_ids() if self.is_annotated(i)]
if label == MALICIOUS:
annotated_ids = [i for i in annotated_ids if self.get_label(i)]
elif label == BENIGN:
annotated_ids = [i for i in annotated_ids if not self.get_label(i)]
if family is not None:
return [i for i in annotated_ids if self.get_family(i) == family]
else:
return annotated_ids
After Change
if label == "all":
mask = self.labels != None // NOQA: 711
else:
mask = self.labels == label_str_to_bool(label)
if family is not None:
family_mask = self.families == family
mask = np.logical_and(mask, family_mask)
return self.ids.ids[mask]
def get_unlabeled_ids(self):
return self.ids.ids[self.labels == None] // NOQA: 711
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/data/annotations.py
Class Name: Annotations
Method Name: get_annotated_ids
Project Name: Qiskit/qiskit-aqua
Commit Name: 95a3314789b0b19f68b803804e2c55be067ff884
Time: 2019-07-22
Author: chenrich@us.ibm.com
File Name: qiskit/aqua/operators/common.py
Class Name:
Method Name: measure_pauli_z
Project Name: geomstats/geomstats
Commit Name: 5d041d65cce8f6a1e3cd49be3fdfaae5beb4875f
Time: 2020-04-21
Author: nicolas.guigui@inria.fr
File Name: geomstats/geometry/special_euclidean.py
Class Name: SpecialEuclidean3
Method Name: belongs