Działająca wersja
This commit is contained in:
parent
351af34703
commit
9a74d214b5
BIN
src/__pycache__/tree.cpython-38.pyc
Normal file
BIN
src/__pycache__/tree.cpython-38.pyc
Normal file
Binary file not shown.
93
src/main.py
93
src/main.py
@ -2,8 +2,9 @@ import pygame
|
|||||||
import random
|
import random
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from src.a_star import a_star_search, WAREHOUSE_MAP, St
|
from src.a_star import a_star_search, WAREHOUSE_MAP
|
||||||
from src.bfs import breadth_first_search
|
from src.training_data.scripts.gen_data_id3 import generate_size, generate_weight, generate_price, generate_flammability, generate_explosiveness
|
||||||
|
from src.tree import predict_result, load_tree_from_structure
|
||||||
|
|
||||||
pygame.init()
|
pygame.init()
|
||||||
|
|
||||||
@ -12,6 +13,7 @@ HEIGHT = 675
|
|||||||
size = 75
|
size = 75
|
||||||
QTY_OF_PACKAGES = 8
|
QTY_OF_PACKAGES = 8
|
||||||
RECT_SIZE = 9
|
RECT_SIZE = 9
|
||||||
|
data_tree = load_tree_from_structure('tree/tree_model')
|
||||||
|
|
||||||
IMAGE = pygame.image.load('img/wozek2.png')
|
IMAGE = pygame.image.load('img/wozek2.png')
|
||||||
BACKGROUND = pygame.transform.scale(pygame.image.load('img/background.png'), (WIDTH, HEIGHT))
|
BACKGROUND = pygame.transform.scale(pygame.image.load('img/background.png'), (WIDTH, HEIGHT))
|
||||||
@ -39,20 +41,46 @@ def create_positions():
|
|||||||
|
|
||||||
|
|
||||||
def generate_package(a, b):
|
def generate_package(a, b):
|
||||||
rand_y = random.randint(1, 4)
|
name_list = ['Grocery', 'Builders', 'Electronic', 'Explosive']
|
||||||
rand_x = random.randint(10, 150)
|
image_list = ['img/package_grocery.png', 'img/package_builders.png', 'img/package.png', 'img/package_explosive.png']
|
||||||
name_list = ['Grocery', 'Explosive', 'Electronic', 'Builders']
|
rand_type = random.randint(1, 4)
|
||||||
image_list = ['img/package_grocery.png', 'img/package_explosive.png', 'img/package.png', 'img/package_builders.png']
|
#rand_weight = generate_weight()
|
||||||
p1 = Package((a, b), rand_x, name_list[rand_y - 1], image_list[rand_y - 1])
|
rand_weight = random.randint(1, 10)
|
||||||
|
#rand_size = generate_size()
|
||||||
|
rand_size = random.randint(1, 10)
|
||||||
|
rand_flammability = generate_flammability(name_list[rand_type - 1])
|
||||||
|
rand_explosiveness = generate_explosiveness(name_list[rand_type - 1])
|
||||||
|
#rand_price = generate_price()
|
||||||
|
rand_price = random.randint(1, 10)
|
||||||
|
|
||||||
|
p1 = Package((a, b), rand_weight, rand_type, rand_size, rand_flammability, rand_explosiveness, rand_price,
|
||||||
|
image_list[rand_type - 1])
|
||||||
return p1
|
return p1
|
||||||
|
|
||||||
|
|
||||||
|
# class Package:
|
||||||
|
# def __init__(self, pos, content, content_size, pack_image):
|
||||||
|
# self.pos = pos
|
||||||
|
# self.content = content
|
||||||
|
# self.content_size = content_size
|
||||||
|
# self.image = pygame.transform.scale(pygame.image.load(pack_image), (50, 50))
|
||||||
|
# self.rect = self.image.get_rect(center=pos)
|
||||||
|
# self.is_package_up = False
|
||||||
|
|
||||||
class Package:
|
class Package:
|
||||||
def __init__(self, pos, content, content_size, pack_image):
|
def __init__(self, pos, package_weight, package_type, package_size, flammability, explosiveness, price, image):
|
||||||
self.pos = pos
|
self.pos = pos
|
||||||
self.content = content
|
self.package_weight = package_weight
|
||||||
self.content_size = content_size
|
self.package_type = package_type
|
||||||
self.image = pygame.transform.scale(pygame.image.load(pack_image), (50, 50))
|
name_list = ['Grocery', 'Builders', 'Electronic', 'Explosive']
|
||||||
|
self.package_type_name = name_list[package_type - 1]
|
||||||
|
self.package_size = package_size
|
||||||
|
self.flammability = flammability
|
||||||
|
self.explosiveness = explosiveness
|
||||||
|
self.price = price
|
||||||
|
self.image = pygame.transform.scale(pygame.image.load(image), (50, 50))
|
||||||
|
self.is_accepted = predict_result(data_tree, self.package_weight, self.package_type, self.package_size, self.flammability, self.explosiveness, self.price)[0]
|
||||||
|
#self.is_accepted = 0
|
||||||
self.rect = self.image.get_rect(center=pos)
|
self.rect = self.image.get_rect(center=pos)
|
||||||
self.is_package_up = False
|
self.is_package_up = False
|
||||||
|
|
||||||
@ -157,6 +185,10 @@ class Agent:
|
|||||||
package.is_package_up = False
|
package.is_package_up = False
|
||||||
elif package.pos == agent.pos:
|
elif package.pos == agent.pos:
|
||||||
package.is_package_up = True
|
package.is_package_up = True
|
||||||
|
print("TYP: {}, WAGA: {}, ROZMIAR: {}, LATWOPALNOSC: {}, WYBUCHOWOSC: {}, CENA: {}, CZY PRZYJETA: {}"
|
||||||
|
.format(package.package_type_name, package.package_weight, package.package_size,
|
||||||
|
package.flammability,
|
||||||
|
package.explosiveness, package.price, package.is_accepted))
|
||||||
|
|
||||||
def goal_test(self, state):
|
def goal_test(self, state):
|
||||||
if state == self.goal:
|
if state == self.goal:
|
||||||
@ -167,10 +199,8 @@ class Agent:
|
|||||||
|
|
||||||
board = pygame.Surface((WIDTH, HEIGHT), pygame.SRCALPHA) # transparently surface
|
board = pygame.Surface((WIDTH, HEIGHT), pygame.SRCALPHA) # transparently surface
|
||||||
|
|
||||||
|
|
||||||
create_positions()
|
create_positions()
|
||||||
|
|
||||||
|
|
||||||
# Rysowanie lini
|
# Rysowanie lini
|
||||||
for x in range(9):
|
for x in range(9):
|
||||||
for y in range(9):
|
for y in range(9):
|
||||||
@ -187,27 +217,25 @@ Shelf_list = [
|
|||||||
Shelf((5, 8), 'Electronic', 5), Shelf((6, 8), 'Electronic', 5), Shelf((7, 8), 'Electronic', 5),
|
Shelf((5, 8), 'Electronic', 5), Shelf((6, 8), 'Electronic', 5), Shelf((7, 8), 'Electronic', 5),
|
||||||
Shelf((8, 8), 'Electronic', 5)]
|
Shelf((8, 8), 'Electronic', 5)]
|
||||||
|
|
||||||
coord_goals = [(8, 0), (0, 0), (5, 8), (0, 0), (8, 0), (0, 0), (8, 8), (0, 0),
|
coord_goals = [(0, 0)]
|
||||||
(5, 6), (0, 0), (6, 6), (0, 0), (7, 6), (0, 0), (8, 6), (0, 8)]
|
free_shelf = [(5, 8), (6, 8), (7, 8), (8, 8), (5, 6), (6, 6), (7, 6), (8, 6)]
|
||||||
|
|
||||||
screen = pygame.display.set_mode([WIDTH, HEIGHT])
|
screen = pygame.display.set_mode([WIDTH, HEIGHT])
|
||||||
|
|
||||||
Package_list = [
|
Package_list = [
|
||||||
generate_package(40, 40)
|
Package((40, 40), 3, 4, 6, 3, 3, 6, 'img/package_explosive.png')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
agent.path = a_star_search((agent.pos_coord[1], agent.pos_coord[0]), coord_goals.pop(0), agent.agent_direction)
|
||||||
|
|
||||||
#print(a_star_search((6, 8), (0, 0), "down"))
|
|
||||||
agent.path = a_star_search((agent.pos_coord[1], agent.pos_coord[0]), (0, 0), agent.agent_direction)
|
|
||||||
|
|
||||||
# Pętla służąca do tworzenia plam oleju na podstawie mapy magazynu
|
# Pętla służąca do tworzenia plam oleju na podstawie mapy magazynu
|
||||||
Stain_list = []
|
Stain_list = []
|
||||||
|
|
||||||
for index_x in range(9):
|
for index_x in range(9):
|
||||||
for index_y in range(9):
|
for index_y in range(9):
|
||||||
if WAREHOUSE_MAP[index_x][index_y] == St:
|
if WAREHOUSE_MAP[index_x][index_y] == 10:
|
||||||
Stain_list.append(Stain((index_y, index_x)))
|
Stain_list.append(Stain((index_y, index_x)))
|
||||||
|
|
||||||
running = True
|
running = True
|
||||||
|
|
||||||
while running:
|
while running:
|
||||||
@ -226,9 +254,14 @@ while running:
|
|||||||
for package in Package_list:
|
for package in Package_list:
|
||||||
if package.pos == (40, 40):
|
if package.pos == (40, 40):
|
||||||
is_dock_empty = False
|
is_dock_empty = False
|
||||||
|
|
||||||
elif package.pos == get_pix_from_position[(8, 0)] and not package.is_package_up:
|
elif package.pos == get_pix_from_position[(8, 0)] and not package.is_package_up:
|
||||||
print("Paczka wyrzucona")
|
print("Paczka wyrzucona")
|
||||||
Package_list.remove(package)
|
Package_list.remove(package)
|
||||||
|
is_dock_empty = False
|
||||||
|
elif get_position_from_pix(package.pos) in free_shelf:
|
||||||
|
Package_list.remove(package)
|
||||||
|
is_dock_empty = False
|
||||||
|
|
||||||
if is_dock_empty:
|
if is_dock_empty:
|
||||||
Package_list.append(generate_package(40, 40))
|
Package_list.append(generate_package(40, 40))
|
||||||
@ -239,14 +272,22 @@ while running:
|
|||||||
agent.move_bfs()
|
agent.move_bfs()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
agent.lift_package_bfs()
|
agent.lift_package_bfs()
|
||||||
if coord_goals:
|
|
||||||
|
if agent.pos_coord == (0, 0):
|
||||||
|
|
||||||
|
if Package_list[-1].is_accepted == 1:
|
||||||
|
coord_goals.append(free_shelf[random.randint(0, 7)])
|
||||||
|
coord_goals.append((0, 0))
|
||||||
|
else:
|
||||||
|
coord_goals.append((8, 0))
|
||||||
|
coord_goals.append((0, 0))
|
||||||
|
|
||||||
agent.goal = coord_goals.pop(0)
|
agent.goal = coord_goals.pop(0)
|
||||||
agent.goal_achieved = False
|
agent.goal_achieved = False
|
||||||
|
|
||||||
#agent.path = breadth_first_search(agent.pos_coord, agent.goal, agent.agent_direction)
|
agent.path = a_star_search((agent.pos_coord[1], agent.pos_coord[0]), (agent.goal[1], agent.goal[0]),
|
||||||
agent.path = a_star_search((agent.pos_coord[1], agent.pos_coord[0]), (agent.goal[1], agent.goal[0]), agent.agent_direction)
|
agent.agent_direction)
|
||||||
|
|
||||||
for package in Package_list:
|
for package in Package_list:
|
||||||
if package.is_package_up:
|
if package.is_package_up:
|
||||||
@ -256,7 +297,7 @@ while running:
|
|||||||
# DRAWING
|
# DRAWING
|
||||||
screen.blit(BACKGROUND, [0, 0])
|
screen.blit(BACKGROUND, [0, 0])
|
||||||
screen.blit(DOCK, [0, 0])
|
screen.blit(DOCK, [0, 0])
|
||||||
screen.blit(pygame.transform.flip(DOCK, True, False), [8*size, 0])
|
screen.blit(pygame.transform.flip(DOCK, True, False), [8 * size, 0])
|
||||||
screen.blit(board, board.get_rect())
|
screen.blit(board, board.get_rect())
|
||||||
for shelf in Shelf_list:
|
for shelf in Shelf_list:
|
||||||
screen.blit(shelf.image, shelf.rect)
|
screen.blit(shelf.image, shelf.rect)
|
||||||
@ -266,7 +307,7 @@ while running:
|
|||||||
for package in Package_list:
|
for package in Package_list:
|
||||||
screen.blit(package.image, package.rect)
|
screen.blit(package.image, package.rect)
|
||||||
|
|
||||||
time.sleep(0.15)
|
time.sleep(0.05)
|
||||||
|
|
||||||
pygame.display.update()
|
pygame.display.update()
|
||||||
|
|
||||||
|
Binary file not shown.
@ -1,3 +1,5 @@
|
|||||||
|
3,4,6,2,3,8,0
|
||||||
|
3,4,6,2,3,8,1
|
||||||
10,2,2,0,0,4,0
|
10,2,2,0,0,4,0
|
||||||
1,1,4,0,0,5,1
|
1,1,4,0,0,5,1
|
||||||
5,1,10,0,0,10,0
|
5,1,10,0,0,10,0
|
||||||
@ -65,7 +67,7 @@
|
|||||||
2,3,8,3,0,1,1
|
2,3,8,3,0,1,1
|
||||||
9,4,2,5,4,5,0
|
9,4,2,5,4,5,0
|
||||||
8,3,5,0,0,3,1
|
8,3,5,0,0,3,1
|
||||||
9,4,3,3,4,1,1
|
9,4,3,3,4,1,0
|
||||||
7,4,6,3,3,2,1
|
7,4,6,3,3,2,1
|
||||||
1,2,2,4,0,5,0
|
1,2,2,4,0,5,0
|
||||||
3,1,3,0,0,10,0
|
3,1,3,0,0,10,0
|
||||||
@ -89,7 +91,7 @@
|
|||||||
10,3,5,0,0,2,1
|
10,3,5,0,0,2,1
|
||||||
4,2,7,5,0,2,0
|
4,2,7,5,0,2,0
|
||||||
4,4,10,4,2,9,0
|
4,4,10,4,2,9,0
|
||||||
9,3,6,0,0,5,1
|
9,3,6,0,0,5,0
|
||||||
4,2,1,0,0,3,1
|
4,2,1,0,0,3,1
|
||||||
2,2,1,1,2,8,1
|
2,2,1,1,2,8,1
|
||||||
10,4,4,4,4,4,0
|
10,4,4,4,4,4,0
|
||||||
@ -101,7 +103,7 @@
|
|||||||
2,1,2,0,0,1,1
|
2,1,2,0,0,1,1
|
||||||
2,3,3,0,0,2,1
|
2,3,3,0,0,2,1
|
||||||
4,1,7,0,0,3,1
|
4,1,7,0,0,3,1
|
||||||
9,3,7,0,0,1,1
|
9,3,7,0,0,1,0
|
||||||
3,3,6,0,0,4,1
|
3,3,6,0,0,4,1
|
||||||
8,4,4,3,5,2,0
|
8,4,4,3,5,2,0
|
||||||
5,3,3,0,0,3,1
|
5,3,3,0,0,3,1
|
||||||
@ -115,7 +117,7 @@
|
|||||||
3,1,4,0,0,1,1
|
3,1,4,0,0,1,1
|
||||||
1,3,3,0,0,4,1
|
1,3,3,0,0,4,1
|
||||||
6,1,6,0,0,2,1
|
6,1,6,0,0,2,1
|
||||||
10,1,2,0,0,5,1
|
10,1,2,0,0,5,0
|
||||||
7,1,3,0,0,4,1
|
7,1,3,0,0,4,1
|
||||||
7,3,4,0,0,8,1
|
7,3,4,0,0,8,1
|
||||||
1,3,7,0,0,2,1
|
1,3,7,0,0,2,1
|
||||||
@ -143,19 +145,19 @@
|
|||||||
4,4,7,3,5,4,0
|
4,4,7,3,5,4,0
|
||||||
5,2,5,0,0,3,1
|
5,2,5,0,0,3,1
|
||||||
1,3,7,0,0,4,1
|
1,3,7,0,0,4,1
|
||||||
10,3,6,1,0,7,1
|
10,3,6,1,0,7,0
|
||||||
3,2,5,5,0,8,0
|
3,2,5,5,0,8,0
|
||||||
1,1,1,0,0,1,1
|
1,1,1,0,0,1,1
|
||||||
3,3,6,0,0,3,1
|
3,3,6,0,0,3,1
|
||||||
2,3,3,0,0,5,1
|
2,3,3,0,0,5,1
|
||||||
4,2,3,0,1,10,1
|
4,2,3,0,1,10,0
|
||||||
4,2,2,0,0,5,1
|
4,2,2,0,0,5,1
|
||||||
3,3,7,0,0,5,1
|
3,3,7,0,0,5,1
|
||||||
3,2,6,5,0,2,0
|
3,2,6,5,0,2,0
|
||||||
9,2,1,5,1,3,0
|
9,2,1,5,1,3,0
|
||||||
7,1,8,0,0,1,0
|
7,1,8,0,0,1,0
|
||||||
2,1,9,0,0,3,0
|
2,1,9,0,0,3,1
|
||||||
6,3,1,4,0,9,1
|
6,3,1,4,0,9,0
|
||||||
4,3,5,0,0,4,1
|
4,3,5,0,0,4,1
|
||||||
5,4,6,3,3,5,1
|
5,4,6,3,3,5,1
|
||||||
1,2,10,2,0,3,0
|
1,2,10,2,0,3,0
|
||||||
@ -191,7 +193,7 @@
|
|||||||
3,2,2,3,2,2,1
|
3,2,2,3,2,2,1
|
||||||
2,1,7,0,0,5,1
|
2,1,7,0,0,5,1
|
||||||
1,2,3,0,2,4,1
|
1,2,3,0,2,4,1
|
||||||
9,2,5,0,0,2,0
|
9,2,5,0,0,2,1
|
||||||
4,3,8,5,0,5,0
|
4,3,8,5,0,5,0
|
||||||
2,2,6,4,0,1,1
|
2,2,6,4,0,1,1
|
||||||
3,3,4,0,2,3,1
|
3,3,4,0,2,3,1
|
||||||
|
|
14
src/tree.py
14
src/tree.py
@ -4,8 +4,8 @@ import pandas
|
|||||||
from sklearn import tree
|
from sklearn import tree
|
||||||
from sklearn.tree import DecisionTreeClassifier
|
from sklearn.tree import DecisionTreeClassifier
|
||||||
|
|
||||||
columns = ["weight", "type", "size", "inflammability", "explosiveness", "prize", "allowed_in"]
|
columns = ["weight", "type", "size", "inflammability", "explosiveness", "price", "allowed_in"]
|
||||||
attributes = ["weight", "type", "size", "inflammability", "explosiveness", "prize"]
|
attributes = ["weight", "type", "size", "inflammability", "explosiveness", "price"]
|
||||||
decisions = ["allowed_in"]
|
decisions = ["allowed_in"]
|
||||||
|
|
||||||
|
|
||||||
@ -21,8 +21,8 @@ def learning_tree():
|
|||||||
return decision_tree
|
return decision_tree
|
||||||
|
|
||||||
|
|
||||||
def making_decision(decision_tree, weight, type, size, inflammability, explosiveness, prize):
|
def predict_result(decision_tree, weight, type, size, inflammability, explosiveness, price):
|
||||||
decision = decision_tree.predict([[weight, type, size, inflammability, explosiveness, prize]])
|
decision = decision_tree.predict([[weight, type, size, inflammability, explosiveness, price]])
|
||||||
return decision
|
return decision
|
||||||
|
|
||||||
|
|
||||||
@ -50,3 +50,9 @@ def save_tree_to_structure(decision_tree):
|
|||||||
def load_tree_from_structure(file):
|
def load_tree_from_structure(file):
|
||||||
return joblib.load(file)
|
return joblib.load(file)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
tree_data = learning_tree()
|
||||||
|
save_all(tree_data)
|
||||||
|
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 337 KiB After Width: | Height: | Size: 302 KiB |
@ -1,6 +1,6 @@
|
|||||||
|--- feature_3 <= 2.50
|
|--- feature_0 <= 8.50
|
||||||
| |--- feature_5 <= 9.50
|
| |--- feature_5 <= 8.50
|
||||||
| | |--- feature_0 <= 8.50
|
| | |--- feature_3 <= 1.50
|
||||||
| | | |--- feature_2 <= 7.50
|
| | | |--- feature_2 <= 7.50
|
||||||
| | | | |--- feature_5 <= 7.50
|
| | | | |--- feature_5 <= 7.50
|
||||||
| | | | | |--- feature_2 <= 2.50
|
| | | | | |--- feature_2 <= 2.50
|
||||||
@ -13,130 +13,106 @@
|
|||||||
| | | | | | | | |--- feature_5 <= 3.00
|
| | | | | | | | |--- feature_5 <= 3.00
|
||||||
| | | | | | | | | |--- class: 1
|
| | | | | | | | | |--- class: 1
|
||||||
| | | | | | | | |--- feature_5 > 3.00
|
| | | | | | | | |--- feature_5 > 3.00
|
||||||
| | | | | | | | | |--- feature_3 <= 1.00
|
| | | | | | | | | |--- class: 0
|
||||||
| | | | | | | | | | |--- class: 0
|
|
||||||
| | | | | | | | | |--- feature_3 > 1.00
|
|
||||||
| | | | | | | | | | |--- class: 1
|
|
||||||
| | | | | |--- feature_2 > 2.50
|
| | | | | |--- feature_2 > 2.50
|
||||||
| | | | | | |--- class: 1
|
| | | | | | |--- class: 1
|
||||||
| | | | |--- feature_5 > 7.50
|
| | | | |--- feature_5 > 7.50
|
||||||
| | | | | |--- feature_3 <= 0.50
|
| | | | | |--- feature_1 <= 2.50
|
||||||
| | | | | | |--- feature_2 <= 2.50
|
|
||||||
| | | | | | | |--- class: 0
|
|
||||||
| | | | | | |--- feature_2 > 2.50
|
|
||||||
| | | | | | | |--- feature_0 <= 3.50
|
|
||||||
| | | | | | | | |--- feature_2 <= 5.50
|
|
||||||
| | | | | | | | | |--- class: 0
|
|
||||||
| | | | | | | | |--- feature_2 > 5.50
|
|
||||||
| | | | | | | | | |--- class: 1
|
|
||||||
| | | | | | | |--- feature_0 > 3.50
|
|
||||||
| | | | | | | | |--- class: 1
|
|
||||||
| | | | | |--- feature_3 > 0.50
|
|
||||||
| | | | | | |--- class: 1
|
| | | | | | |--- class: 1
|
||||||
|
| | | | | |--- feature_1 > 2.50
|
||||||
|
| | | | | | |--- feature_0 <= 4.50
|
||||||
|
| | | | | | | |--- class: 0
|
||||||
|
| | | | | | |--- feature_0 > 4.50
|
||||||
|
| | | | | | | |--- class: 1
|
||||||
| | | |--- feature_2 > 7.50
|
| | | |--- feature_2 > 7.50
|
||||||
| | | | |--- feature_1 <= 2.50
|
| | | | |--- feature_0 <= 5.00
|
||||||
| | | | | |--- feature_2 <= 9.50
|
| | | | | |--- feature_2 <= 8.50
|
||||||
| | | | | | |--- class: 0
|
| | | | | | |--- class: 1
|
||||||
| | | | | |--- feature_2 > 9.50
|
| | | | | |--- feature_2 > 8.50
|
||||||
| | | | | | |--- feature_5 <= 2.00
|
| | | | | | |--- feature_2 <= 9.50
|
||||||
|
| | | | | | | |--- feature_1 <= 1.50
|
||||||
|
| | | | | | | | |--- feature_5 <= 3.50
|
||||||
|
| | | | | | | | | |--- class: 1
|
||||||
|
| | | | | | | | |--- feature_5 > 3.50
|
||||||
|
| | | | | | | | | |--- class: 0
|
||||||
|
| | | | | | | |--- feature_1 > 1.50
|
||||||
|
| | | | | | | | |--- class: 0
|
||||||
|
| | | | | | |--- feature_2 > 9.50
|
||||||
| | | | | | | |--- class: 1
|
| | | | | | | |--- class: 1
|
||||||
| | | | | | |--- feature_5 > 2.00
|
| | | | |--- feature_0 > 5.00
|
||||||
| | | | | | | |--- class: 0
|
|
||||||
| | | | |--- feature_1 > 2.50
|
|
||||||
| | | | | |--- feature_2 <= 9.00
|
|
||||||
| | | | | | |--- class: 1
|
|
||||||
| | | | | |--- feature_2 > 9.00
|
|
||||||
| | | | | | |--- class: 0
|
|
||||||
| | |--- feature_0 > 8.50
|
|
||||||
| | | |--- feature_5 <= 1.50
|
|
||||||
| | | | |--- class: 1
|
|
||||||
| | | |--- feature_5 > 1.50
|
|
||||||
| | | | |--- feature_5 <= 6.50
|
|
||||||
| | | | | |--- feature_2 <= 4.50
|
|
||||||
| | | | | | |--- feature_1 <= 1.50
|
|
||||||
| | | | | | | |--- feature_0 <= 9.50
|
|
||||||
| | | | | | | | |--- class: 0
|
|
||||||
| | | | | | | |--- feature_0 > 9.50
|
|
||||||
| | | | | | | | |--- class: 1
|
|
||||||
| | | | | | |--- feature_1 > 1.50
|
|
||||||
| | | | | | | |--- class: 0
|
|
||||||
| | | | | |--- feature_2 > 4.50
|
|
||||||
| | | | | | |--- feature_1 <= 2.50
|
|
||||||
| | | | | | | |--- class: 0
|
|
||||||
| | | | | | |--- feature_1 > 2.50
|
|
||||||
| | | | | | | |--- feature_4 <= 1.00
|
|
||||||
| | | | | | | | |--- class: 1
|
|
||||||
| | | | | | | |--- feature_4 > 1.00
|
|
||||||
| | | | | | | | |--- class: 0
|
|
||||||
| | | | |--- feature_5 > 6.50
|
|
||||||
| | | | | |--- class: 1
|
|
||||||
| |--- feature_5 > 9.50
|
|
||||||
| | |--- feature_4 <= 0.50
|
|
||||||
| | | |--- class: 0
|
|
||||||
| | |--- feature_4 > 0.50
|
|
||||||
| | | |--- class: 1
|
|
||||||
|--- feature_3 > 2.50
|
|
||||||
| |--- feature_3 <= 4.50
|
|
||||||
| | |--- feature_2 <= 8.50
|
|
||||||
| | | |--- feature_0 <= 1.50
|
|
||||||
| | | | |--- feature_1 <= 3.50
|
|
||||||
| | | | | |--- feature_5 <= 3.00
|
|
||||||
| | | | | | |--- class: 1
|
|
||||||
| | | | | |--- feature_5 > 3.00
|
|
||||||
| | | | | | |--- class: 0
|
|
||||||
| | | | |--- feature_1 > 3.50
|
|
||||||
| | | | | |--- class: 0
|
| | | | | |--- class: 0
|
||||||
| | | |--- feature_0 > 1.50
|
| | |--- feature_3 > 1.50
|
||||||
| | | | |--- feature_0 <= 6.50
|
| | | |--- feature_4 <= 3.50
|
||||||
| | | | | |--- feature_0 <= 4.50
|
| | | | |--- feature_2 <= 9.00
|
||||||
| | | | | | |--- feature_5 <= 7.00
|
| | | | | |--- feature_3 <= 4.50
|
||||||
| | | | | | | |--- feature_0 <= 2.50
|
| | | | | | |--- feature_1 <= 3.50
|
||||||
|
| | | | | | | |--- feature_3 <= 3.50
|
||||||
| | | | | | | | |--- class: 1
|
| | | | | | | | |--- class: 1
|
||||||
| | | | | | | |--- feature_0 > 2.50
|
| | | | | | | |--- feature_3 > 3.50
|
||||||
| | | | | | | | |--- feature_2 <= 6.00
|
| | | | | | | | |--- feature_5 <= 4.00
|
||||||
| | | | | | | | | |--- feature_4 <= 2.50
|
| | | | | | | | | |--- class: 1
|
||||||
| | | | | | | | | | |--- feature_1 <= 3.00
|
| | | | | | | | |--- feature_5 > 4.00
|
||||||
| | | | | | | | | | | |--- class: 1
|
| | | | | | | | | |--- class: 0
|
||||||
| | | | | | | | | | |--- feature_1 > 3.00
|
| | | | | | |--- feature_1 > 3.50
|
||||||
|
| | | | | | | |--- feature_3 <= 3.50
|
||||||
|
| | | | | | | | |--- feature_2 <= 3.50
|
||||||
|
| | | | | | | | | |--- class: 0
|
||||||
|
| | | | | | | | |--- feature_2 > 3.50
|
||||||
|
| | | | | | | | | |--- feature_0 <= 4.50
|
||||||
|
| | | | | | | | | | |--- feature_5 <= 2.50
|
||||||
| | | | | | | | | | | |--- class: 0
|
| | | | | | | | | | | |--- class: 0
|
||||||
| | | | | | | | | |--- feature_4 > 2.50
|
| | | | | | | | | | |--- feature_5 > 2.50
|
||||||
|
| | | | | | | | | | | |--- truncated branch of depth 3
|
||||||
|
| | | | | | | | | |--- feature_0 > 4.50
|
||||||
| | | | | | | | | | |--- class: 1
|
| | | | | | | | | | |--- class: 1
|
||||||
| | | | | | | | |--- feature_2 > 6.00
|
| | | | | | | |--- feature_3 > 3.50
|
||||||
| | | | | | | | | |--- feature_3 <= 3.50
|
| | | | | | | | |--- feature_0 <= 2.00
|
||||||
| | | | | | | | | | |--- class: 0
|
| | | | | | | | | |--- class: 0
|
||||||
| | | | | | | | | |--- feature_3 > 3.50
|
| | | | | | | | |--- feature_0 > 2.00
|
||||||
| | | | | | | | | | |--- feature_0 <= 3.50
|
| | | | | | | | | |--- class: 1
|
||||||
| | | | | | | | | | | |--- class: 0
|
| | | | | |--- feature_3 > 4.50
|
||||||
| | | | | | | | | | |--- feature_0 > 3.50
|
| | | | | | |--- feature_2 <= 2.50
|
||||||
| | | | | | | | | | | |--- class: 1
|
|
||||||
| | | | | | |--- feature_5 > 7.00
|
|
||||||
| | | | | | | |--- class: 0
|
|
||||||
| | | | | |--- feature_0 > 4.50
|
|
||||||
| | | | | | |--- class: 1
|
|
||||||
| | | | |--- feature_0 > 6.50
|
|
||||||
| | | | | |--- feature_5 <= 2.50
|
|
||||||
| | | | | | |--- feature_4 <= 4.50
|
|
||||||
| | | | | | | |--- class: 1
|
| | | | | | | |--- class: 1
|
||||||
| | | | | | |--- feature_4 > 4.50
|
| | | | | | |--- feature_2 > 2.50
|
||||||
| | | | | | | |--- class: 0
|
| | | | | | | |--- feature_0 <= 5.50
|
||||||
| | | | | |--- feature_5 > 2.50
|
| | | | | | | | |--- class: 0
|
||||||
| | | | | | |--- class: 0
|
| | | | | | | |--- feature_0 > 5.50
|
||||||
| | |--- feature_2 > 8.50
|
| | | | | | | | |--- class: 1
|
||||||
| | | |--- class: 0
|
| | | | |--- feature_2 > 9.00
|
||||||
| |--- feature_3 > 4.50
|
|
||||||
| | |--- feature_0 <= 2.50
|
|
||||||
| | | |--- feature_2 <= 2.50
|
|
||||||
| | | | |--- class: 1
|
|
||||||
| | | |--- feature_2 > 2.50
|
|
||||||
| | | | |--- class: 0
|
|
||||||
| | |--- feature_0 > 2.50
|
|
||||||
| | | |--- feature_4 <= 0.50
|
|
||||||
| | | | |--- feature_0 <= 5.50
|
|
||||||
| | | | | |--- class: 0
|
| | | | | |--- class: 0
|
||||||
| | | | |--- feature_0 > 5.50
|
| | | |--- feature_4 > 3.50
|
||||||
| | | | | |--- feature_0 <= 8.00
|
| | | | |--- feature_3 <= 3.50
|
||||||
|
| | | | | |--- feature_4 <= 4.50
|
||||||
| | | | | | |--- class: 1
|
| | | | | | |--- class: 1
|
||||||
| | | | | |--- feature_0 > 8.00
|
| | | | | |--- feature_4 > 4.50
|
||||||
| | | | | | |--- class: 0
|
| | | | | | |--- feature_2 <= 3.50
|
||||||
| | | |--- feature_4 > 0.50
|
| | | | | | | |--- feature_2 <= 1.50
|
||||||
|
| | | | | | | | |--- class: 0
|
||||||
|
| | | | | | | |--- feature_2 > 1.50
|
||||||
|
| | | | | | | | |--- class: 1
|
||||||
|
| | | | | | |--- feature_2 > 3.50
|
||||||
|
| | | | | | | |--- class: 0
|
||||||
|
| | | | |--- feature_3 > 3.50
|
||||||
|
| | | | | |--- class: 0
|
||||||
|
| |--- feature_5 > 8.50
|
||||||
|
| | |--- feature_0 <= 1.50
|
||||||
|
| | | |--- class: 1
|
||||||
|
| | |--- feature_0 > 1.50
|
||||||
|
| | | |--- feature_2 <= 1.50
|
||||||
|
| | | | |--- feature_0 <= 3.00
|
||||||
|
| | | | | |--- class: 1
|
||||||
|
| | | | |--- feature_0 > 3.00
|
||||||
|
| | | | | |--- class: 0
|
||||||
|
| | | |--- feature_2 > 1.50
|
||||||
| | | | |--- class: 0
|
| | | | |--- class: 0
|
||||||
|
|--- feature_0 > 8.50
|
||||||
|
| |--- feature_5 <= 2.50
|
||||||
|
| | |--- feature_1 <= 2.50
|
||||||
|
| | | |--- class: 1
|
||||||
|
| | |--- feature_1 > 2.50
|
||||||
|
| | | |--- feature_0 <= 9.50
|
||||||
|
| | | | |--- class: 0
|
||||||
|
| | | |--- feature_0 > 9.50
|
||||||
|
| | | | |--- class: 1
|
||||||
|
| |--- feature_5 > 2.50
|
||||||
|
| | |--- class: 0
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user