Script output
This commit is contained in:
parent
70edcea2ca
commit
ed68d78d98
1 changed files with 1 additions and 1 deletions
29
photovoltaic_gruppe4.py
Normal file
29
photovoltaic_gruppe4.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
import tensorflow as tf
|
||||
|
||||
import pywatts.db
|
||||
from pywatts.routines import *
|
||||
|
||||
# get rid of TF debug message
|
||||
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
|
||||
|
||||
if len(sys.argv) != 2:
|
||||
print("Usage: python photovoltaic_gruppe4.py <file.json>")
|
||||
exit(1)
|
||||
|
||||
json_file = sys.argv[1] # json file
|
||||
|
||||
oneH, queries = input_queries(json_file)
|
||||
|
||||
feature_col = [tf.feature_column.numeric_column(str(idx)) for idx in range(336)]
|
||||
n = pywatts.neural.Net(feature_cols=feature_col)
|
||||
|
||||
predictions = []
|
||||
for query in queries:
|
||||
if oneH:
|
||||
predictions.extend(predict(n, query).astype('Float64').tolist())
|
||||
else:
|
||||
predictions.append(predict24h(n, query))
|
||||
print(predictions, file=open("test_data_gruppe4.json", "w"))
|
Loading…
Add table
Add a link
Reference in a new issue