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.

169 questions
17
votes
3 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
  • 7,334
  • 9
  • 37
  • 54
13
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
  • 181
  • 2
  • 8
12
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
  • 359
  • 1
  • 3
  • 11
9
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
  • 52,075
  • 130
  • 401
  • 707
8
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
  • 594
  • 7
  • 23
8
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
  • 3,961
  • 2
  • 20
  • 34
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
  • 1,955
  • 6
  • 25
  • 51
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
  • 683
  • 11
  • 34
6
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…
6
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
  • 4,879
  • 11
  • 46
  • 72
6
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
  • 63
  • 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
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
  • 7,978
  • 13
  • 52
  • 65
4
votes
2 answers

Curve fit or interpolation in a semilogy plot using scipy

I have very few data points and I want to create a line to best fit the data points when plotted in a semilogy scale. I have tried curve-fit and cubic interpolation from scipy, but none of them seems to be very reasonable to me compared to the data…
bhjghjh
  • 819
  • 1
  • 13
  • 32
4
votes
1 answer

Is it necessary to include GameObjects whose physics are deterministic in worldUpdate?

In order to reduce data transfer size and the computational time for serializing world objects for each worldUpdate, I was wondering if it is possible to omit syncs for objects whose physics can be entirely, faithfully simulated on the client-side…
1
2 3
11 12