コード例 #1
0
ファイル: test_rad.py プロジェクト: parsahosseini/aiops-rad
    def test_large_x_small_n_is_normal(self):

        # limit(x -> 0) and limit(n -> inf) => normal; node is far down
        x = np.random.randint(10, 1000)
        n = np.random.randint(50, 100)
        self.assertTrue(rad.s(x=x, n=n) <= .5)
コード例 #2
0
ファイル: test_rad.py プロジェクト: parsahosseini/aiops-rad
    def test_small_x_large_n_is_anomaly(self):

        # limit(x -> 0) and limit(n -> inf) => anomaly; node if near the top
        x = np.random.randint(0, 3)
        n = np.random.randint(50, 1000)
        self.assertTrue(rad.s(x=x, n=n) >= .5)