Compare commits

...

3 Commits

Author SHA1 Message Date
Paul Schaub a8fd0844d2
Add readme 2018-09-13 14:50:50 +02:00
Paul Schaub 688b4025df
Fix script again 2018-09-13 14:13:41 +02:00
Paul Schaub 615428944a
Add fancy schmancy progress bar 2018-09-13 13:29:48 +02:00
2 changed files with 45 additions and 1 deletions

27
README.md Normal file
View File

@ -0,0 +1,27 @@
PyWatts - Predict Output of Solar Panels
# Dependencies
PyWatts is based on python3.6 and uses the following dependencies:
* requests (2.19.1)
* pypvwatts (2.1.0)
* numpy (1.15.0)
* peewee (3.5.4)
* scikit-learn (0.19.2)
* pandas (0.23.4)
* tensorflow (1.9.0)
* matplotlib (2.2.3)
* scipy (1.1.0)
We suggest using a python virtualenv.
# Execute
The script can be executed by issuing the follwing command:
```bash
$ python photovoltaic_gruppe4.py data.json
```
The output can be found in the same directory in `test_data_gruppe4.json`

View File

@ -21,9 +21,26 @@ 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:
total = len(queries)
for idx, query in enumerate(queries):
percent = idx / total
sys.stdout.write("\r")
progress = ""
for i in range(20):
if i < int(20 * percent):
progress += "="
else:
progress += " "
sys.stdout.write("[ %s ] %.2f%%" % (progress, percent * 100))
sys.stdout.flush()
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"))
sys.stdout.write("\r")
print("[ ==================== ] 100.00%")