gaur3009 commited on
Commit
77139d7
·
verified ·
1 Parent(s): 1b7462b

Create meta_learning.py

Browse files
Files changed (1) hide show
  1. agents/meta_learning.py +12 -0
agents/meta_learning.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ import os
3
+
4
+ def log(hypothesis, result):
5
+ path = "data/log.csv"
6
+ if os.path.exists(path):
7
+ df = pd.read_csv(path)
8
+ else:
9
+ df = pd.DataFrame(columns=['hypothesis','result'])
10
+ df = pd.concat([df, pd.DataFrame({'hypothesis':[hypothesis],'result':[result]})])
11
+ df.to_csv(path, index=False)
12
+ return df.tail(5)