Skip to content
Snippets Groups Projects
Commit f4eaec17 authored by Steffen Vogel's avatar Steffen Vogel :santa_tone2:
Browse files

timeseries: add calculation of RMS error between two timeseries

parent 46a289f7
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,12 @@ class TimeSeries:
ts_phase = TimeSeries(name, self.time, phase_values)
return ts_phase
@staticmethod
def rmse(ts1, ts2):
""" Calculate root mean square error between two time series
"""
return np.sqrt((TimeSeries.diff('diff', ts1, ts2).values ** 2).mean())
@staticmethod
def diff(name, ts1, ts2):
"""Returns difference between values of two Timeseries objects.
......
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