


Я пытался подогнать данные к тригонометрическим функция, однако она была недостаточно хороша.
Код: Выделить всё
def trigonometric_model2(t, a1, b1, a2, b2, a3, b3, a4, b4, a5, b5, a6, b6, a7, b7, a8, b8, c):
return (a1 * np.sin(b1 * t) + a2 * np.cos(b2 * t) +
a3 * np.sin(b3 * t) + a4 * np.cos(b4 * t) +
a5 * np.sin(b5 * t) + a6 * np.cos(b6 * t) +
a7 * np.sin(b7 * t) + a8 * np.cos(b8 * t) +
c)
params, _ = curve_fit(trigonometric_model2, ts, accs[:, 0], maxfev=60000)
ys = trigonometric_model2(xs, *params)

Вот пример данных https://docs.google.com/spreadsheets/d/ ... sp=sharing
Подробнее здесь: https://stackoverflow.com/questions/790 ... erpolation