a4376fc2e3c1eec67decf36bc0a1771ad17a771e,src/attacks/newtonfool_unittest.py,TestNewtonFool,test_krclassifier,#TestNewtonFool#,71

Before Change


        print(krc.predict(x_test, logits=True))
        grads = krc.class_gradient(x_test, logits=False)
        import numpy as np
        print("min is: ", np.min(grads), ", max is: ", np.max(grads))

        self.assertFalse(True)
//         // Attack
//         nf = NewtonFool(krc)

After Change



        // Attack
        nf = NewtonFool(krc)
        nf.set_params(max_iter=5)
        x_test_adv = nf.generate(x_test)
        self.assertFalse((x_test == x_test_adv).all())

        y_pred = krc.predict(x_test)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: a4376fc2e3c1eec67decf36bc0a1771ad17a771e
Time: 2018-04-24
Author: M.N.Tran@ibm.com
File Name: src/attacks/newtonfool_unittest.py
Class Name: TestNewtonFool
Method Name: test_krclassifier


Project Name: KrishnaswamyLab/PHATE
Commit Name: 305fe8318688be276fefdaab125b1fb92ea62895
Time: 2018-06-21
Author: scottgigante@gmail.com
File Name: Python/phate/test.py
Class Name:
Method Name: test_tree


Project Name: fmfn/BayesianOptimization
Commit Name: d9968178a65694bb0bbdcf307e972314e8b77218
Time: 2014-06-23
Author: fmfnogueira@gmail.com
File Name: bayes_opt/cv/magic_box.py
Class Name: magic_box_classifier
Method Name: fit