-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathmain.py
More file actions
37 lines (25 loc) · 1.2 KB
/
main.py
File metadata and controls
37 lines (25 loc) · 1.2 KB
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
29
30
31
32
33
34
35
36
37
def main(features_path, prediction_results_path, model_path, load_model):
"""
Docstring for main
:param features_path: Path to the features csv used as input to the model (e.g. ./data/features.csv).
:param prediction_results_path: Path to save the output predictions of the model (e.g. ./result/predictions/predictions_MODEL.csv).
:param model_path: Path to save or load the trained model (e.g. ./result/predictions/predictions_MODEL.csv).
:param load_model: Boolean to train the model and save it to model_path if False, load it from model_path if True.
"""
# load dataset CSV file
# split the dataset into training and testing sets.
if load_model:
# load the model
pass
else:
# train the classifier (using logistic regression as an example)
# save the model.
pass
# test the classifier.
# write test results to CSV.
if __name__ == "__main__":
features_path = "./data/features.csv"
prediction_results_path = "./result/predictions/predictions_MODEL.csv"
model_path = "./result/predictions/predictions_MODEL.csv"
load_model = False
main(features_path, prediction_results_path,model_path,load_model)