def test_ValidationCorr_ReturnsConfusion(self):
     X = self.makeh5(np.random.rand(10, 3))
     T = self.makeh5(np.random.rand(10, 2))
     hpelm = HPELM(3, 2, classification="c")
     hpelm.add_neurons(6, "tanh")
     fHH = self.makefile()
     fHT = self.makefile()
     hpelm.add_data(X, T, fHH=fHH, fHT=fHT)
     _, _, confs = hpelm.validation_corr(fHH, fHT, X, T, steps=3)
     self.assertGreater(np.sum(confs[0]), 1)
예제 #2
0
 def test_ValidationCorr_ReturnsConfusion(self):
     X = self.makeh5(np.random.rand(10, 3))
     T = self.makeh5(np.random.rand(10, 2))
     hpelm = HPELM(3, 2, classification="c")
     hpelm.add_neurons(6, "tanh")
     fHH = self.makefile()
     fHT = self.makefile()
     hpelm.add_data(X, T, fHH=fHH, fHT=fHT)
     _, _, confs = hpelm.validation_corr(fHH, fHT, X, T, steps=3)
     self.assertGreater(np.sum(confs[0]), 1)
 def test_ValidationCorr_Works(self):
     X = self.makeh5(np.random.rand(30, 3))
     T = self.makeh5(np.random.rand(30, 2))
     hpelm = HPELM(3, 2, norm=1e-6)
     hpelm.add_neurons(6, "tanh")
     fHH = self.makefile()
     fHT = self.makefile()
     hpelm.add_data(X, T, fHH=fHH, fHT=fHT)
     nns, err, confs = hpelm.validation_corr(fHH, fHT, X, T, steps=3)
     self.assertGreater(err[0], err[-1])
예제 #4
0
 def test_ValidationCorr_Works(self):
     X = self.makeh5(np.random.rand(30, 3))
     T = self.makeh5(np.random.rand(30, 2))
     hpelm = HPELM(3, 2, norm=1e-6)
     hpelm.add_neurons(6, "tanh")
     fHH = self.makefile()
     fHT = self.makefile()
     hpelm.add_data(X, T, fHH=fHH, fHT=fHT)
     nns, err, confs = hpelm.validation_corr(fHH, fHT, X, T, steps=3)
     self.assertGreater(err[0], err[-1])