I have these 2 sets, Set A, and Set B (https://paste.debian.net/343292/) that contains data of several previous executions. The Set B contains the total execution times, and Set A contains several variables that were at the time of execution.
I have this code that calculates multivariate linear regression [1], but in the end the predicted time is a negative value. I don't know if I have a problem in the python code, or in the 2 sets, or in the way I calculate the new time
. Where do I have this problem?
[1] Python code
xx = np.array(set_a)
yy = np.array(set_b)
A = np.column_stack((xx, np.ones(len(xx))))
# linearly generated sequence
coeffs = linalg.lstsq(A, yy)[0] # obtaining the parameters
wqueueacapacity = coeffs[0]
wbytesread = coeffs[1]
wmaps = coeffs[2]
wcpu_info = coeffs[3]
wmem_info = coeffs[4]
# I predict the time by multiplying weights with new params that I don't depict here.
time = (wbytesread * params[1]) + (wqueueacapacity * params[0]) + (wmaps * params[2]) + (wcpu_info * params[3]) + (wmem_info * params[4]) + coeffs[5]