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_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")