Exemplo n.º 1
0
    def test_bootstrap_list(self):
        bs_list = TestBootstrap.generate_test_bootstrap_list()
        bs_list.getData(0)
        # segmentation fault?
        #bs_list.getThres(0.95, 0)
        bs_list.getThres_byPos(0,0)
        bs_list.getNblocks()
        bs_list.getCut(0)
        bs_list.getAcc_t(0)
        bs_list.getAcc_s(0)
        bs_list.getBias_t(0)
        bs_list.getBias_s(0)
        bs_list.getRpd(0)
        # should this not throw a BadIndexError
        bs_list.percRpd(0)
        bs_list.getRkd(0)
        # should this not thow a BadIndexError?
        bs_list.percRkd(0)

        bs_list.setBCa_t(0, 0.1, 0.1)
        bs_list.setBCa_s(0, 0.1, 0.1)
        bs_list.setData(0, sfr.vector_int([24, 32, 40,48, 50,48]))
        bs_list.setThres(0.5, 0, 0)
        bs_list.setRpd(0, 0.5)
        bs_list.setRkd(0, 0.5)
Exemplo n.º 2
0
    def test_bootstrap_list(self):
        bs_list = TestBootstrap.generate_test_bootstrap_list()
        bs_list.getData(0)
        # segmentation fault?
        #bs_list.getThres(0.95, 0)
        bs_list.getThres_byPos(0,0)
        bs_list.getNblocks()
        bs_list.getCut(0)
        bs_list.getAcc_t(0)
        bs_list.getAcc_s(0)
        bs_list.getBias_t(0)
        bs_list.getBias_s(0)
        bs_list.getRpd(0)
        # should this not throw a BadIndexError
        bs_list.percRpd(0)
        bs_list.getRkd(0)
        # should this not thow a BadIndexError?
        bs_list.percRkd(0)

        bs_list.setBCa_t(0, 0.1, 0.1)
        bs_list.setBCa_s(0, 0.1, 0.1)
        bs_list.setData(0, sfr.vector_int([24, 32, 40,48, 50,48]))
        bs_list.setThres(0.5, 0, 0)
        bs_list.setRpd(0, 0.5)
        bs_list.setRkd(0, 0.5)
Exemplo n.º 3
0
    def test_data(self):
        data = TestData.generate_test_dataset()
        data.setNcorrect(sfr.vector_int([24, 32, 40,48, 50,48]))

        data.getIntensities()
        data.getNtrials()
        data.getNcorrect()
        data.getPcorrect()

        blocks = data.getNblocks()

        for i in range(blocks):
            data.getIntensity(i)
            data.getNtrials(i)
            data.getNcorrect(i)
            data.getPcorrect(i)
            data.getNoverK(i)

        data.getNalternatives()
        data.nonasymptotic()
Exemplo n.º 4
0
    def test_data(self):
        data = TestData.generate_test_dataset()
        data.setNcorrect(sfr.vector_int([24, 32, 40,48, 50,48]))

        data.getIntensities()
        data.getNtrials()
        data.getNcorrect()
        data.getPcorrect()

        blocks = data.getNblocks()

        for i in range(blocks):
            data.getIntensity(i)
            data.getNtrials(i)
            data.getNcorrect(i)
            data.getPcorrect(i)
            data.getNoverK(i)

        data.getNalternatives()
        data.nonasymptotic()
Exemplo n.º 5
0
 def generate_test_dataset():
     x = sfr.vector_double([0.,2.,4.,6., 8., 10.])
     k = sfr.vector_int([24, 32, 40,48, 50,48])
     n = sfr.vector_int(6*[50])
     return sfr.PsiData(x, n, k, 2)
Exemplo n.º 6
0
 def generate_test_dataset():
     x = sfr.vector_double([0.,2.,4.,6., 8., 10.])
     k = sfr.vector_int([24, 32, 40,48, 50,48])
     n = sfr.vector_int(6*[50])
     return sfr.PsiData(x, n, k, 2)