Skip to content
Snippets Groups Projects
Commit 91b1e09c authored by Andreas Kämper's avatar Andreas Kämper
Browse files

Update automog.py - sqrt(mse) as component update criterion

parent c3c48829
Branches
No related tags found
No related merge requests found
...@@ -320,7 +320,7 @@ class AutoMoG(object): ...@@ -320,7 +320,7 @@ class AutoMoG(object):
for state in comp.operating_points: for state in comp.operating_points:
curves = self.curves[comp.name][state] curves = self.curves[comp.name][state]
sect = self.sections[comp.name][state] sect = self.sections[comp.name][state]
total_model_error += curves[sect]['mse']*comp.weighting_factors[comp.inputs[0]] total_model_error += np.sqrt(curves[sect]['mse'])*comp.weighting_factors[comp.inputs[0]]
return total_model_error return total_model_error
...@@ -399,7 +399,7 @@ class AutoMoG(object): ...@@ -399,7 +399,7 @@ class AutoMoG(object):
elif self.options['mode'] == 'WEIGHTED ERROR': elif self.options['mode'] == 'WEIGHTED ERROR':
weight_error_model = sum(sum(comp.weighting_factors[comp.inputs[0]]*\ weight_error_model = sum(sum(comp.weighting_factors[comp.inputs[0]]*\
np.sqrt(self.curves[comp.name][state][self.sections[comp.name][state]]['model_error']) np.sqrt(self.curves[comp.name][state][self.sections[comp.name][state]]['mse'])
for state in comp.operating_points) for state in comp.operating_points)
for comp in self.components.values()) for comp in self.components.values())
...@@ -658,4 +658,4 @@ class MOG_Component(object): ...@@ -658,4 +658,4 @@ class MOG_Component(object):
if not attr == 'sections': if not attr == 'sections':
setattr(self, attr, kwargs[attr]) setattr(self, attr, kwargs[attr])
else: else:
self.sections = kwargs[attr] self.sections = kwargs[attr]
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment