mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-12-22 14:15:01 +00:00
start working on plotting script, but it isn't finished yet
This commit is contained in:
parent
6b17d45aad
commit
698bbe2ffb
1 changed files with 19 additions and 0 deletions
19
aimodel/src/plot_metrics.py
Normal file
19
aimodel/src/plot_metrics.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
import os
|
||||
import seaborn as sns
|
||||
import pandas as pd
|
||||
|
||||
def plot_metric(train, val, name, dir_output):
|
||||
plt.plot(train, label=f"train_{name}")
|
||||
plt.plot(val, label=f"val_{name}")
|
||||
plt.title(name)
|
||||
plt.xlabel("epoch")
|
||||
plt.ylabel(name)
|
||||
plt.savefig(os.path.join(dir_output, f"{name}.png"))
|
||||
plt.close()
|
||||
|
||||
FILEPATH_INPUT = os.environ["INPUT"]
|
||||
DIRPATH_OUTPUT = os.environ["OUTPUT"] if "OUTPUT" in os.environ else os.getcwd()
|
||||
|
||||
|
||||
df = pd.read_csv(FILEPATH_INPUT)
|
||||
|
Loading…
Reference in a new issue