Python Forum
Find factor to match test curve to golden curve
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Find factor to match test curve to golden curve
#1
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:

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.02
I 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

.csv   test.csv (Size: 137 bytes / Downloads: 270)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Learning curve astral_travel 1 216 Mar-10-2024, 08:00 AM
Last Post: snippsat
  How can I design shapes on a curve in python? mervea 2 763 Sep-14-2023, 01:04 PM
Last Post: Pedroski55
  Fitting data to a curve daaegp 1 565 Jun-30-2023, 08:06 PM
Last Post: Gribouillis
  How to test and import a model form computer to test accuracy using Sklearn library Anldra12 6 3,063 Jul-03-2021, 10:07 AM
Last Post: Anldra12
  Fitting Gaussian curve to data file Laplace12 0 2,669 Jun-09-2021, 10:45 AM
Last Post: Laplace12
  search of a curve fitting function bluffy5 2 2,376 Dec-13-2020, 09:53 AM
Last Post: ndc85430
  Smooth curve in matplotlib medatib531 0 1,792 Apr-02-2020, 08:07 PM
Last Post: medatib531
  How to write test cases for a init function by Unit test in python? binhduonggttn 2 3,062 Feb-24-2020, 12:06 PM
Last Post: Larz60+
  How to write test cases by Unit test for database configuration file? binhduonggttn 0 2,511 Feb-18-2020, 08:03 AM
Last Post: binhduonggttn
  Import Text, output curve geometry Alyner 0 1,930 Feb-03-2020, 03:05 AM
Last Post: Alyner

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020