Usuń 'src/rabbit.py'

This commit is contained in:
Dominik Zawadzki 2020-05-21 16:57:08 +00:00
parent dd3c53c82e
commit 51fa7c527d

View File

@ -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)