Esempio n. 1
0
File: 12.py Progetto: Nelson198/AA2
    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")
Esempio n. 2
0
    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")