def test_classification(self): unicorn = UnicornML({"file": "./data/abalone.csv"}) X = np.concatenate((unicorn.X_train, unicorn.X_test), axis=0) y = np.concatenate((unicorn.y_train, unicorn.y_test), axis=0) unicorn.Rainbow() yatt = unicorn.predict(X) accuracy = unicorn.evaluate(y, yatt) print("Accuracy %f" % accuracy) self.assertEqual("foo".upper(), "FOO")
def test_linearRegression(self): unicorn = UnicornML({"file": "./data/housing.csv"}) X = np.concatenate((unicorn.X_train, unicorn.X_test), axis=0) y = np.concatenate((unicorn.y_train, unicorn.y_test), axis=0) unicorn.Rainbow() yatt = unicorn.predict(X) mse = unicorn.evaluate(y, yatt) print("mse: %f" % mse) self.assertEqual("foo".upper(), "FOO")
def test_linearRegression(self): unicorn = UnicornML( {"images": "/home/joseb/Desktop/aa2/aula6/cats_and_dogs_small"}, { "height": 150, "width": 150, "depth": 3, "fine_tuning": False }) unicorn.Rainbow() acc = unicorn.evaluate(1, 1) print("acc: %f" % acc) self.assertEqual("foo".upper(), "FOO")