9 lines
180 B
Python
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)
|