c35b902f44627bc53be6152092bc60ae82b1fe2e,art/attacks/inference/membership_inference.py,MembershipInferenceBlackBox,fit,#MembershipInferenceBlackBox#Any#Any#Any#Any#,195
Before Change
Default is probability.
:return: An array holding the inferred membership status, 1 indicates a member and 0 indicates non-member.
if "input_type" not in kwargs.keys():
self.input_type = "probability"
else:
self.input_type = kwargs.get("input_type")
if y.shape[0] != x.shape[0]:
raise ValueError("Number of rows in x and y do not match")
if self.estimator.input_shape[0] != x.shape[1]:
raise ValueError("Shape of x does not match input_shape of classifier")
After Change
if NeuralNetworkMixin not in type(self.estimator).__mro__:
raise ValueError("loss input_type can only be used with neural networks")
// members
features = self .estimator.loss(x, y).astype(np.float32).reshape(-1, 1)
// non-members
test_features = self.estimator.loss(test_x, test_y).astype(np.float32).reshape(-1, 1)
else:
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances Project Name: IBM/adversarial-robustness-toolbox
Commit Name: c35b902f44627bc53be6152092bc60ae82b1fe2e
Time: 2020-08-25
Author: abigailt@il.ibm.com
File Name: art/attacks/inference/membership_inference.py
Class Name: MembershipInferenceBlackBox
Method Name: fit
Project Name: sony/nnabla
Commit Name: a6f63f9d910d93d5cf3a2d016a0ed2b925f9eb9f
Time: 2018-11-19
Author: Akio.Hayakawa@sony.com
File Name: python/src/nnabla/utils/image_utils/cv2_utils.py
Class Name:
Method Name: imresize
Project Name: NTMC-Community/MatchZoo
Commit Name: 53a93d8af5d041f6c5dfdef2fb763f8419e3023d
Time: 2019-01-19
Author: i@uduse.com
File Name: matchzoo/datasets/snli/load_data.py
Class Name:
Method Name: load_data
Project Name: aleju/imgaug
Commit Name: 8eb4cb520a5ccfca9c25e849ccf0e17b1cd0659d
Time: 2018-12-23
Author: alexander.jung@zenuity.com
File Name: imgaug/augmenters/geometric.py
Class Name: PerspectiveTransform
Method Name: _augment_images