post-merge cleanup

This commit is contained in:
s452645 2021-06-06 19:00:20 +02:00
parent 5ab0f21a84
commit 985c7c0d77
5 changed files with 6 additions and 6 deletions

View File

@ -18,7 +18,7 @@ class DecisionTree:
self.vec = None
def build(self, training_file: str, depth: int):
path = os.path.join("../..", "..", "resources", "data", training_file)
path = os.path.join("../..", "..", "resources", "data", "decision_tree", training_file)
samples = list()
results = list()

View File

@ -128,8 +128,8 @@ if __name__ == "__main__":
# neural_network.save()
# Loading a model from file:
neural_network = NeuralNetwork(NNType.SERIES, r"series/saved_model.h5", r"series/saved_model_classes.joblib")
neural_network = NeuralNetwork(NNType.SPECIFICITY, r"specificity/saved_model.h5", r"specificity/saved_model_classes.joblib")
# Test
image = r"../../../resources/data/neural_network/series/disarm/W/5.jpg"
image = r"../../../resources/data/neural_network/specificity/disarm/tanks/1-35-British-Tank-FV-214-Conqueror-MK-II-Amusing-Hobby-35A027-AH-35A027_b_0.JPG"
neural_network.get_answer(image)

View File

@ -3,7 +3,7 @@ from assets import asset_constants as asset
import json
from time import sleep
from pygame import transform
from algorithms.learn.decision_tree import DecisionTree
from algorithms.learn.decision_tree.decision_tree import DecisionTree
# Class of our agent, initialization of it
@ -21,8 +21,8 @@ class Agent:
self.row, self.column = int(self.row), int(self.column)
self.position = [self.row, self.column]
self.on_screen_coordinates = const.get_tile_coordinates(tuple(self.position))
self.decision_tree = DecisionTree(const.ROOT_DIR + "/algorithms/learn/decision_tree.joblib",
const.ROOT_DIR + "/algorithms/learn/dict_vectorizer.joblib")
self.decision_tree = DecisionTree(const.ROOT_DIR + "/algorithms/learn/decision_tree/decision_tree.joblib",
const.ROOT_DIR + "/algorithms/learn/decision_tree/dict_vectorizer.joblib")
self.direction = const.Direction(data["agents_initial_state"]["direction"])
self.rotation_angle = -const.Direction(self.direction).value * 90
self.going_forward = False