Skip to content
Snippets Groups Projects
Commit b8cf7863 authored by Rui Zhang's avatar Rui Zhang
Browse files

Switch to obs-exp as active learning target

parent d3800f10
No related branches found
No related tags found
No related merge requests found
Pipeline #4625062 passed
...@@ -836,18 +836,20 @@ def writeLimitsToCSV( limitDict ): ...@@ -836,18 +836,20 @@ def writeLimitsToCSV( limitDict ):
for csvLine in csvMetaList: writer.writerow(csvLine) for csvLine in csvMetaList: writer.writerow(csvLine)
limit = 0 limit_exp, limit_obs = 0
with open ('limits.csv') as f: with open ('limits.csv') as f:
reader = csv.DictReader(f) reader = csv.DictReader(f)
for row in reader: for row in reader:
for (k,v) in row.items(): for (k,v) in row.items():
if k == 'bestEstimate': if k == 'bestEstimate':
limit = float(v) limit_obs = float(v)
if k == 'expectedLimit':
limit_exp = float(v)
import json import json
import numpy as np import numpy as np
result = {} result = {}
with open('output.json', 'w') as f: with open('output.json', 'w') as f:
result['loss'] = limit result['loss'] = limit_obs - limit_exp # let active learning searching for excess
print(result) print(result)
json.dump(result, f, indent=2) json.dump(result, f, indent=2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment