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
22
votes
4 answers

Extrapolate values in Pandas DataFrame

It's very easy to interpolate NaN cells in a Pandas DataFrame: In [98]: df Out[98]: neg neu pos avg 250 0.508475 0.527027 0.641292 0.558931 500 NaN NaN NaN NaN 1000 0.650000 0.571429 …
Jimmy C
  • 9,270
  • 11
  • 44
  • 64
14
votes
2 answers

Interpolation and Extrapolation of Randomly Scattered data to Uniform Grid in 3D

I have a 256 x 256 x 32 grid of regularly spaced points ranging over x, y, and z and with an associated variable "a". I also have a group of randomly scattered points in a more confined x, y, z space, with an associated variable "b". What I…
MEvans
  • 301
  • 1
  • 3
  • 8
13
votes
4 answers

Interpolate (or extrapolate) only small gaps in pandas dataframe

I have a pandas DataFrame with time as index (1 min Freq) and several columns worth of data. Sometimes the data contains NaN. If so, I want to interpolate only if the gap is not longer than 5 Minutes. In this case this would be a maximum of 5…
Nras
  • 4,251
  • 3
  • 25
  • 37
13
votes
4 answers

How to do linear regression, taking errorbars into account?

I am doing a computer simulation for some physical system of finite size, and after this I am doing extrapolation to the infinity (Thermodynamic limit). Some theory says that data should scale linearly with system size, so I am doing linear…
Vladimir
  • 369
  • 1
  • 3
  • 12
10
votes
1 answer

Extrapolate Pandas DataFrame

It is easy to interpolate values in a Pandas.DataFrame using Series.interpolate, how can extrapolation be done? For example, given a DataFrame as shown, how can we extrapolate it 14 more months to 2014-12-31? Linear extrapolation is fine. X1 =…
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
9
votes
2 answers

Extrapolate from triangulation

Suppose we have five vertices: X = [0 1; 2 1; 4 1; 1 0; 3 0]; a triangulation: T = [1 4 2; 4 5 2; 5 3 2]; and function values defined on the vertices: Fx = [1; 2; 3; 4; -5]; then we can easily…
Paul
  • 766
  • 9
  • 28
8
votes
0 answers

How to do smooth frame interpolation and extrapolation using OpenCV?

My source data files are weather radar images captured every 15 minutes. I'm trying to make a smooth interpolation of intermediate frames and I'm trying to extrapolate the motion onwards from the last measurement. So far, my method has been to…
8
votes
1 answer

How to extrapolate curves in Python?

I have some data represented on the figure below, I am able to interpolate the data points (dotted lines), and am looking to extrapolate them in both direction. How can I extrapolate these curves in Python with NumPy/SciPy? The code I used for the…
Tom Kurushingal
  • 6,086
  • 20
  • 54
  • 86
7
votes
5 answers

Cubic spline extrapolation

I have a nice cubic spline code but it is for interpolation only. I need to extrapolate just a little into the future. Does anyone know of a good source of code, not a library, for doing this? This is the code I wrote in basic (now ASM) for…
Mike Trader
  • 8,564
  • 13
  • 55
  • 66
7
votes
2 answers

How to interpolate data between sparse points to make a contour plot in R & plotly

I'd like to create a contour plot on th xy plane from concentration data at the following coloured points in the fist figure. I don't have corner points at each height so I need to extrapolate the concentration to the edges of the xy plane…
HCAI
  • 2,213
  • 8
  • 33
  • 65
7
votes
1 answer

Fitting a spline function in R to interpolate daily values from monthly values

Take a data frame that looks like this and contains data for some dates in 2005 and a measurement at each date. df <- data.frame("date" = c('2005-04-04','2005-04-19', '2005-04-26', '2005-05-05', '2005-05-12', '2005-05-25', '2005-06-02',…
Pad
  • 841
  • 2
  • 17
  • 45
7
votes
2 answers

Extraploation with 'nearest' method in Python

I'm looking to find the Python equivalent of the following Matlab statement: vq interp1(x,y, xq,'nearest','extrap') It looks as if interp(xq, x, y) works perfectly for linear interpolation/extrapolation. I also looked at F =…
user3174418
  • 73
  • 1
  • 3
6
votes
1 answer

Python-Predicting/Extrapolating future data given a data set

I'm very new to Python. I have a data set and I'm trying to use numPy/sciPy to predict/extrapolate future data points. Is there a simple way to come up with a mathematical function(say, a Sine function) that fits my current data, and then I could…
ccheng21
  • 61
  • 1
  • 3
5
votes
2 answers

Getting a mean curve of several curves with x-values not being the same

I have several datasets containing many x- and y-values. An example with a lot fewer values would look something like this: data_set1: x1 y1 --------- --------- 0 100 0.0100523 65.1077 0.0201047 64.0519 0.030157 …
Denver Dang
  • 2,433
  • 3
  • 38
  • 68
5
votes
0 answers

How does the Linear Extrapolation of ScatteredInterpolant() work in MATLAB?

For my project I have to write a C++ code, equivalent to the ScatteredInterpolant() function of Matlab. My data points are scattered data in three dimension. I am able to calculate the Delaunay tetrahedrals using the TetGen library. I have compared…
gman
  • 157
  • 1
  • 3
  • 13
1
2 3
13 14