Questions tagged [extrapolation]

extrapolation is a method of constructing new data points outside the range of a discrete set of known data points

Extrapolation is a method of constructing new data points outside the range of a discrete set of known data points.

197 questions
1
vote
1 answer

Extrapolating using Pandas and Curve_fit error func() takes 3 positional arguments but 4 were given

def func(x,a,b): return a*x + b guess = (0.5,0.5,0.5) fit_df = df.dropna() col_params = {} for col in fit_df.columns: x = fit_df.index.astype(float).values y = fit_df[col].values params = curve_fit(func,x,y,guess) …
1
vote
1 answer

Identify groups with all missing values for a variable and extrapolate within groups in R

I want to identify the groups that only have missing values for a given variable. My data looks like this: id <- seq(1:4) year <- c(2005, 2006, 2007, 2008) y <- c(6, 11, NA, NA, NA, NA, NA, NA, 9, NA, NA, 7, 8, 7, NA, 12) test <- data.frame(id,…
Marj
  • 25
  • 5
1
vote
1 answer

Extrapolation of time series dataset

I have the dataset consisting of energy demand per each of the user profiles, sampled on every half an hour during different days (for example Weekday in Summer or Saturday in Winter). What I would like to do is to extend this for each day of a year…
1
vote
0 answers

Interpolate scattered 2D data with specific extrapolation method

I'm trying to interpolate some scattered 2D data to other given scattered points in Python. I want to use linear interpolation, but want to apply nearest neighbor to the extrapolation points. Matlab's scatteredInterpolant does exactly what I want,…
1
vote
1 answer

Predicting an object's position after a certain amount of time

I'm currently trying to come up with a way to "resolve" a player's position with high accuracy. The position would be the point where a missile will be sent to. The missile would have a speed/delay/width and range. The player has a speed as well…
ctx
  • 11
  • 1
1
vote
0 answers

How to extrapolate on a time series based on correlation

I have a time series data for one year (T1). I have another time series data (T2) for 1 month (Jun). I find there are some similarities between two time series in Jun using correlation coefficients. How can I extrapolate (Jan to Dec) the second time…
biborno
  • 175
  • 1
  • 11
1
vote
0 answers

Regression / "Learning" function

I have a tabulated data with columns: x, a, b, c, ... x has finite range. I would like to find/learn a function f(a,b,c, ...) such that, if we plot all points (x, y = f(a,b,c, ...)) then the line fitting all such points has positive slope. That is,…
sarvivek
  • 203
  • 1
  • 5
1
vote
2 answers

How to interpolate and extrapolate non-monotonic vector data set in Matlab

I have a geographically distributed data set with X-coordinate, Y-coordinate and corresponding target value of interest D. That is, my data set consists from three vectors: X, Y, D. Now what I would like to do, is interpolate and extrapolate the…
jjepsuomi
  • 4,223
  • 8
  • 46
  • 74
1
vote
1 answer

R Flexsurv- estimating a survival function

I have a survival kapplan-Meier curves and I want to extrapolate different model curves (e.g. Weibull, Gompertz,...) using the flexsurv package. I have succeed to do the extrapolation but I do not find the solution to create a matrix of the…
Carine
  • 11
  • 4
1
vote
0 answers

calculating Linear value for a 0.5 binned data

Let suppose we have x and y axis , where x has value with 0.5 binning ,Let suppose i want to identify the y value for x =6.1 , How we can compute that. firstly i thought running an LM function and having coefficient accordingly but the result isnt…
Harvey
  • 245
  • 2
  • 9
1
vote
1 answer

How does scipy.interpolate.CubicSpline's extrapolate work mathematically?

i'm trying to understand how scipy.interpolate.CubicSpline(..., extrapolate=True) works internally: How exactly does Scipy implement the extrapolation of a point x beyond [a, b] mathematically? I'm looking for a formula such as: score(x) = exp(-x +…
1
vote
2 answers

Python Numpy polyfit results differ from SciPy interpolate

I have to use an older scipy version, which can not extrapolate. In scipy 1.1.0 the extrapolation is working as expected, giving proper results. Since I cannot use this in my application I want to use numpy polyfit. but the results are different,…
reintl
  • 21
  • 2
1
vote
1 answer

Interpolation and extrapolation beyond the boundry in some especific points with R

I have s dataset of x=c(1600L, 1650L, 1675L, 1700L, 1725L, 1775L, 1800L, 1825L, 1850L, 1875L, 1880L, 1885L, 1900L, 1920L, 1925L, 1930L, 1935L, 1940L, 1945L, 1950L, 1955L, 1960L, 1965L, 1975L, 1980L, 1985L, 1990L, 1995L, 2000L, 2005L, 2010L,…
Novic
  • 351
  • 1
  • 11
1
vote
1 answer

Extrapolation in R

I have a reference data set, p, p=structure(list(v = 0:26, t = c(Inf, 1.016, 0.568, 0.418666666666667, 0.344, 0.2992, 0.269333333333333, 0.248, 0.232, 0.219555555555556, 0.2096, 0.201454545454545, 0.194666666666667, 0.188923076923077, 0.184,…
Haribo
  • 2,071
  • 17
  • 37
1
vote
1 answer

How to interpolate/extrapolate using na.approx function within individual groups in R

I have a panel dataset with 10 variables for 60 countries, across 18 years (2000-2017), and I have a lot of missing data. Country Year Broadband Albania 2000 NA Albania 2001 NA Albania 2002 NA Albania 2003 NA Albania 2004 …
Lee Tagziria
  • 53
  • 2
  • 10