From 51fa7c527dc9ee91745e0b2fbf062a15ffd13eaf Mon Sep 17 00:00:00 2001 From: Dominik Zawadzki Date: Thu, 21 May 2020 16:57:08 +0000 Subject: [PATCH] =?UTF-8?q?Usu=C5=84=20'src/rabbit.py'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rabbit.py | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 src/rabbit.py diff --git a/src/rabbit.py b/src/rabbit.py deleted file mode 100644 index 51f330f..0000000 --- a/src/rabbit.py +++ /dev/null @@ -1,20 +0,0 @@ -from vowpalwabbit import pyvw - - -class Rabbit: - def __init__(self): - self.data = open('./../resources/simulations/learning_data.txt') - self.model = pyvw.vw(quiet=True) - self.train_set = self.data.read().splitlines() - self.learn() - - def learn(self): - for example in self.train_set: - self.model.learn(example) - - def check(self, matrix, x, y): - set = ["| price:", str(matrix.tile_worth(x, y)), "x:", str(x), "y:", str(y)] - test_sample = ' '.join(set) - prediction = self.model.predict(test_sample) - print(test_sample) - print(prediction)