예제 #1
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")
예제 #2
0
파일: 12.py 프로젝트: 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")
예제 #3
0
    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")