예제 #1
0
    def test_narrow_slack(self):
        w = np.array([0, 2])
        b = -5

        self.assertEqual(find_slack(self.insep_x, self.insep_y, w, b),
                         set([3, 5]))
예제 #2
0
 def test_wide_slack(self):
     w = np.array([-.25, .25])
     b = -.25
     self.assertEqual(find_slack(self.insep_x, self.insep_y, w, b),
                      set([6, 4]))
예제 #3
0
    def test_narrow_slack(self):
        w = array([0, 2])
        b = -5

        self.assertEqual(find_slack(self.insep_x, self.insep_y, w, b),
                         set([3, 5]))
예제 #4
0
 def test_wide_slack(self):
     w = array([-.25, .25])
     b = -.25
     self.assertEqual(find_slack(self.insep_x, self.insep_y, w, b),
                      set([6, 4]))
예제 #5
0
 def test_narrow_slack(self):
     w = array([0, 2])
     b = -5
     self.assertEqual(find_slack(self.insep_x, self.insep_y, w, b), {3, 5})
예제 #6
0
 def test_wide_slack(self):
     w = array([-.25, .25])
     b = -.25
     self.assertEqual(find_slack(self.insep_x, self.insep_y, w, b), {6, 4})