Ejemplo n.º 1
0
    def testPeirceTest1(self):        
        values = [101.2, 90.0, 99.0, 102.0, 103.0, 100.2, 89.0, 98.1, 101.5, 102.0]
        vOld,_oOld = peirceTest.peirceTestOld( values )
#        print 'v=',vOld
#        print vOld.av, vOld.sd
#        print 'o=',_oOld
#        
        v,_o = peirceTest.peirceTest( values )
#        print 'v=',v
#        print v.av, v.sd
#        print 'o=',_o
    
        self.assertTrue( vOld == v )
Ejemplo n.º 2
0
    def testPeirceTest1(self):
        values = [
            101.2, 90.0, 99.0, 102.0, 103.0, 100.2, 89.0, 98.1, 101.5, 102.0
        ]
        vOld, _oOld = peirceTest.peirceTestOld(values)
        #        print 'v=',vOld
        #        print vOld.av, vOld.sd
        #        print 'o=',_oOld
        #
        v, _o = peirceTest.peirceTest(values)
        #        print 'v=',v
        #        print v.av, v.sd
        #        print 'o=',_o

        self.assertTrue(vOld == v)
Ejemplo n.º 3
0
    def testPeirceTest2(self):
        # A stable array just longer than the reference data used in the test.
        values = []
        for i in range(0, 1000):
            values.append(1)
#        nTdebug("n=",len(values))
        for i in range(0, 10):
            values[i] = 2
        # Will only note first 9 outliers
        vOld, oOld = peirceTest.peirceTestOld(values)
        #        print 'v=',vOld
        #        print vOld.av, vOld.sd
        #        print 'obj=',oOld
        #
        v, obj = peirceTest.peirceTest(values)
        #        print 'v=',v
        #        print v.av, v.sd
        #        print 'obj=',obj

        self.assertFalse(vOld == v)
        self.assertFalse(oOld == obj)
Ejemplo n.º 4
0
    def testPeirceTest2(self):
        # A stable array just longer than the reference data used in the test.
        values = []        
        for i in range(0,1000):
            values.append(1)        
#        nTdebug("n=",len(values))
        for i in range(0,10):
            values[i] = 2        
        # Will only note first 9 outliers
        vOld,oOld = peirceTest.peirceTestOld( values )
#        print 'v=',vOld
#        print vOld.av, vOld.sd
#        print 'obj=',oOld
#        
        v,obj = peirceTest.peirceTest( values )
#        print 'v=',v
#        print v.av, v.sd
#        print 'obj=',obj
    
        self.assertFalse( vOld == v )
        self.assertFalse( oOld == obj )