-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
28 lines (25 loc) · 975 Bytes
/
main.py
File metadata and controls
28 lines (25 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from Classes.DataReader import DataReader
from Classes.Tester import Tester
# Read configuration
config = Tester.read_config("config.init")
data_type = config.get("data_type", "")
model_type = config.get("model_type", "dl")
# Dataset initialization based on data_type
if data_type == "img_feature":
dataset = DataReader(path="data/COVID_numerics.csv", image_feature_path="data/feature_vectors.csv")
dataset.drop_feature(["MARITAL STATUS"])
X, T = dataset.X, dataset.Y
elif data_type == "img":
dataset = DataReader(path="data/COVID_numerics.csv", image_dataset_path="data/COVID_IMG.csv")
dataset.drop_feature(["MARITAL STATUS"])
X, T = dataset.images, dataset.Y
elif data_type == "numeric":
dataset = DataReader(path="data/COVID_numerics.csv")
dataset.drop_feature(["MARITAL STATUS"])
X, T = dataset.X, dataset.Y
else:
raise ValueError("Unknown data type")
#Testing
tester = Tester(X, T, model_type)
tester.print_info()
tester.plot()