Files
sycm/test.py
T
2023-11-01 13:49:53 +08:00

19 lines
391 B
Python

import numpy as np
from get_data import get_data
parm_1000 = [-61.4400001, 1402438300.0, 61.4400001]
def reduct(x, parm):
a, b, c = parm
return a * np.exp(-b * x) + c
def check_data(data):
fit_data = reduct(data, parm_1000)
real_data = get_data([data])
print(f"拟合数据: {fit_data}, 实际数据: {real_data}, 误差: {fit_data - real_data}")
check_data(1000)