def test_make_dataset(self): dataset = sfu.make_dataset(data, 1) self.assertTrue( (np.array(x) == np.array(dataset.getIntensities())).all()) self.assertTrue((np.array(k) == np.array(dataset.getNcorrect())).all()) self.assertTrue((np.array(n) == np.array(dataset.getNtrials())).all()) self.assertEqual(1, dataset.getNalternatives())
def test_get_core(self): sigmoid = sfr.PsiLogistic() dataset = sfu.make_dataset(data, 1) ab = sfu.get_core("ab", dataset, sigmoid) self.assertEqual("abCore", ab.__class__.__name__) mw = sfu.get_core("mw", dataset, sigmoid) self.assertEqual("mwCore", mw.__class__.__name__) self.assertEqual(0.1, mw.getAlpha()) mw = sfu.get_core("mw0.2", dataset, sigmoid) self.assertEqual("mwCore", mw.__class__.__name__) self.assertEqual(0.2, mw.getAlpha()) linear = sfu.get_core("linear", dataset, sigmoid) self.assertEqual("linearCore", linear.__class__.__name__) log = sfu.get_core("log", dataset, sigmoid) self.assertEqual("logCore", log.__class__.__name__) weibull = sfu.get_core("weibull", dataset, sigmoid) self.assertEqual("weibullCore", weibull.__class__.__name__) poly = sfu.get_core("poly", dataset, sigmoid) self.assertEqual("polyCore", poly.__class__.__name__)
def test_make_dataset(self): dataset = sfu.make_dataset(data, 1) self.assertTrue((np.array(x) == np.array(dataset.getIntensities())).all()) self.assertTrue((np.array(k) == np.array(dataset.getNcorrect())).all()) self.assertTrue((np.array(n) == np.array(dataset.getNtrials())).all()) self.assertEqual(1, dataset.getNalternatives())