Jun-17-2021, 04:39 AM

Hi,

I have a golden curve and test curve, I want to find a factor to multiply each value in test data such as to match (close to) golden curve slope & golden curve values. Actually golden curve values are much lower than golden values.

the time series data is as below:

data = pd.read_csv(r"D:\Pythoncodes\test.csv")

I have a golden curve and test curve, I want to find a factor to multiply each value in test data such as to match (close to) golden curve slope & golden curve values. Actually golden curve values are much lower than golden values.

the time series data is as below:

Time Golden Test 90 2.2 1.4 100 1.77 1.2 102 1.9 1 105 1.6 0.7 107 1.39 0.4 111 1.45 0.1 119 1.4 0.2 120 1.2 0.05 121 1.1 0.02I use linear regression, but the values are not close to golden.

data = pd.read_csv(r"D:\Pythoncodes\test.csv")

import matplotlib.pyplot as plt import numpy as np from sklearn import datasets, linear_model from sklearn.metrics import mean_squared_error, r2_score # Load the diabetes dataset X_train = data['Time'] y_train = data['Golden'] X_test = data['Time'] y_test = data['Test'] regr = linear_model.LinearRegression() regr.fit(X_train, y_train) y_pred = regr.predict(X_test)But the prediction is higher than expected.

Attached Files

test.csv (Size: 137 bytes / Downloads: 63)