decision_tree_impl #39

Merged
s464981 merged 2 commits from decision_tree_impl into master 2022-06-09 22:33:24 +02:00
3 changed files with 1003 additions and 2 deletions

File diff suppressed because it is too large Load Diff

View File

@ -299,4 +299,4 @@ tower_dist;mob1_dist;mob2_dist;opp1_dist;opp2_dist;opp3_dist;opp4_dist;agent_hp;
29;25;30;19;35;38;33;6;68;5;1;0;5;11;6;mob1
23;43;41;25;27;26;19;7;12;8;3;4;10;11;9;tower
7;9;18;31;36;21;16;4;23;8;4;9;8;11;5;tower
35;21;39;36;36;37;33;10;41;9;4;1;0;7;0;mob1
35;21;39;36;36;37;33;10;41;9;4;1;0;7;0;mob1
1 tower_dist mob1_dist mob2_dist opp1_dist opp2_dist opp3_dist opp4_dist agent_hp tower_hp mob1_hp mob2_hp opp1_hp opp2_hp opp3_hp opp4_hp goal
299 29 25 30 19 35 38 33 6 68 5 1 0 5 11 6 mob1
300 23 43 41 25 27 26 19 7 12 8 3 4 10 11 9 tower
301 7 9 18 31 36 21 16 4 23 8 4 9 8 11 5 tower
302 35 21 39 36 36 37 33 10 41 9 4 1 0 7 0 mob1

View File

@ -26,7 +26,7 @@ def parse_idx_of_opp_or_monster(s: str) -> int:
class DecisionTree:
def __init__(self) -> None:
data_frame = pd.read_csv('learning/dataset_tree.csv', delimiter=';')
data_frame = pd.read_csv('learning/dataset_tree_1000.csv', delimiter=';')
unlabeled_goals = data_frame['goal']
self.goals_label_encoder = LabelEncoder()
self.goals = self.goals_label_encoder.fit_transform(unlabeled_goals)