kraken-bot/linear_regression.py
2024-08-24 16:59:09 -04:00

9 lines
180 B
Python

import numpy
from scipy import stats
def linear_regression(timestamps, values):
x = numpy.array(timestamps)
y = numpy.array(values)
return stats.linregress(x, y)