Skip to content

Commit 7bbd46d

Browse files
committed
update
1 parent d3cd88d commit 7bbd46d

7 files changed

+5
-1
lines changed
7 Bytes
Binary file not shown.

__pycache__/NN.cpython-310.pyc

7 Bytes
Binary file not shown.
7 Bytes
Binary file not shown.

__pycache__/predict.cpython-310.pyc

111 Bytes
Binary file not shown.

__pycache__/train.cpython-310.pyc

7 Bytes
Binary file not shown.

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def __init__(self):
1010
define parameters for training the neural network
1111
"""
1212
self.paramters = {
13-
'Data Size': int(10),
13+
'Data Size': int(1e3),
1414
'save_data': False,
1515
'Frequency_lb': -3,
1616
'Frequency_ub': 8,

predict.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import sklearn
99
import pandas as pd
1010
from sklearn.metrics import accuracy_score
11+
import os
1112
warnings.filterwarnings("ignore")
1213

1314

@@ -45,7 +46,10 @@ def predict(self):
4546
Confidence = Confidence.cpu().detach().numpy()
4647
degree_prediction = degree_prediction.cpu().detach().numpy()
4748
binary_prediction = binary_prediction.cpu().detach().numpy()
49+
import os
4850

51+
folder_name = 'predictions'
52+
os.makedirs(folder_name, exist_ok=True)
4953
np.savetxt('predictions/Pred_Binary_prob', binary_prediction)
5054
np.savetxt('predictions/Pred_Binary', np.round(binary_prediction))
5155

0 commit comments

Comments
 (0)