Python Forum
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extrapolation
#1
Hi!

I have two lists of data that I have done a linear fit on, and I would like to extrapolate this linearly but I don't really know how. I have attempted to do that but it's not working. 

from scipy.interpolate import interp1d
import matplotlib.pyplot as plt
import numpy as np

x=[1,2,3,4,5,6]
y=[2,4,6,8,10,12]

p2=np.polyfit(x,y,1)

f=interp1d(x,y,fill_value="extrapolate")
Any help is appriciated!
Reply


Messages In This Thread
Extrapolation - by bananen - Dec-22-2016, 04:51 PM
RE: Extrapolation - by j.crater - Dec-23-2016, 06:42 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  prediction using linear regression (extrapolation?) in a loop karlito 0 3,369 Feb-05-2020, 10:56 AM
Last Post: karlito

Forum Jump:

User Panel Messages

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