ajout code réseau pour autres datasets

This commit is contained in:
François Pelletier 2019-05-02 03:03:22 -04:00
parent 525c660782
commit f726946326

View file

@ -44,7 +44,27 @@ dt5.train(train5, train_labels5)
dt5.predict(test5[0],test_labels5[0])
dt5.test(test5, test_labels5)
nn1 = NeuralNet.NeuralNet(np.array([4,4,3]),range(3))
nn1.train(train1, train_labels1, 0.1, 100)
nn1 = NeuralNet.NeuralNet(np.array([4,8,3]),range(3))
nn1.train(train1, train_labels1, 0.1, 10)
nn1.predict(test1[0],test_labels1[0])
nn1.test(test1,test_labels1)
nn2 = NeuralNet.NeuralNet(np.array([6,12,2]),range(2))
nn2.train(train2, train_labels2, 0.1, 10)
nn2.predict(test2[0],test_labels2[0])
nn2.test(test2,test_labels2)
nn3 = NeuralNet.NeuralNet(np.array([6,12,2]),range(2))
nn3.train(train3, train_labels3, 0.1, 10)
nn3.predict(test3[0],test_labels3[0])
nn3.test(test3,test_labels3)
nn4 = NeuralNet.NeuralNet(np.array([6,12,2]),range(2))
nn4.train(train4, train_labels4, 0.1, 10)
nn4.predict(test4[0],test_labels4[0])
nn4.test(test4,test_labels4)
nn5 = NeuralNet.NeuralNet(np.array([16,128,3]),range(3))
nn5.train(train5, train_labels5, 0.1, 10)
nn5.predict(test5[0],test_labels5[0])
nn5.test(test5,test_labels5)