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
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
  • 889
  • 3
  • 16
  • 42
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…
4
votes
1 answer

interpolate/extrapolate missing dates in python?

lets say i have the following dataframe bb = pd.DataFrame(data = {'date' :['','','','2015-09-02', '2015-09-02', '2015-09-03','','2015-09-08', '', '2015-09-11','2015-09-14','','' ]}) bb['date'] = pd.to_datetime(bb['date'], format="%Y-%m-%d")…
areddy
  • 373
  • 3
  • 7
  • 18
4
votes
1 answer

How to extrapolate beyond the x points passed to `ksmooth`?

I have a kernel function like so: x <- 1:100 y <- rnorm(100, mean=(x/2000)^2) plot(x,y) kernel <- ksmooth(x,y, kernel="normal", bandwidth=10) print(kernel$y) If I try to predict at a point outside of the range of x values, it will give me NaN,…
makansij
  • 9,303
  • 37
  • 105
  • 183
4
votes
2 answers

How can a list be extended uniformly to include extrapolated mean values?

I have a Python module that provides color palettes and utilities for dealing with them. A color palette object simply inherits from list and is just a list of colors specified in HEX strings. A color palette object has the ability to extend itself…
d3pd
  • 7,935
  • 24
  • 76
  • 127
4
votes
1 answer

Speeding up an interpolation exercise

I'm running about 45,000 local linear regressions (essentially) on about 1.2 million observations, so I'd appreciate some help trying to speed things up because I'm impatient. I'm basically trying to construct year-by-position wage contracts--the…
MichaelChirico
  • 33,841
  • 14
  • 113
  • 198
4
votes
2 answers

Numpy inpaint nans interpolate AND extrapolate

I'm working on a project using numpy and scipy and I need to fill in nanvalues. Currently I use scipy.interpolate.rbf, but it keeps causing python to crash so severely try/except won't even save it. However, after running it a few times, it seems as…
wbest
  • 611
  • 1
  • 6
  • 15
3
votes
3 answers

How to extrapolate values over dates using R

I have data for the first 7 months of a year, and would like to linearly extrapolate the data for the last 5 months. I have tried using the approxExtrap function from the Hmisc package but am not sure how to employ it, particularly what to specify…
dd_data
  • 93
  • 5
3
votes
1 answer

How can I perform linear and trend extrapolation on panel data?

I am trying to extrapolate the following missing values (NAs) in my data with this line of code but it is not working. My Data: landkreis jahr deDomains 1 Ahrweile… 2007 NA 2 Ahrweile… 2008 …
3
votes
0 answers

How to extrapolate only along selected columns of a dataframe?

I have a dataframe like this: Time ID lat long speed 0 27619 1471777 23289.639077 18234.769277 2.25 1 27620 1471777 23287.585417 18238.259976 4.05 2 27621 1471777 23284.390833 18243.689952 …
user3656142
  • 437
  • 3
  • 14
3
votes
1 answer

R linear extrapolate missing values

Is there a simple way to linearly extrapolate missing values in an R data frame? Maybe this is a trivial and often encountered problem in data preprocessing, however, after searching for quite a while, I could not find any straightforward…
lrdbs
  • 33
  • 1
  • 7
3
votes
1 answer

How to do a cubic or higher polynomial multiple regression in Python?

I have a set of data where longitude and latitude are the independent variables and temperature is the dependent variable. I want to be able to perform extrapolation to get temperature values outside of the range of the latitude and longitude. The…
3
votes
1 answer

Extrapolate dataframe rows

I have a df like d = {'col1': [np.nan, np.nan, 1], 'col2': [1, 1, 2], 'col3': [2, 2, 3], 'col4': [np.nan, 3, np.nan]} df = pd.DataFrame(data=d) and would like to extrapolate on the rows to fill any trailing nans. Expected output: d2…
3
votes
2 answers

Python Scipy for 2D extrapolated spline function?

I'd like to write an extrapolated spline function for a 2D matrix. What I have now is an extrapolated spline function for 1D arrays as below. scipy.interpolate.InterpolatedUnivariateSpline() is used. import numpy as np import scipy as sp def…
Wang Zong'an
  • 1,492
  • 5
  • 24
  • 29
3
votes
2 answers

Smoothing of GPS data and removal of outliers

I have real-time GPS data coming at 5 updates per second. On average 80% of the data is fairly accurate; but around 20% of the data is jerky. Plus occasionally we also get an outlier i.e. an erroneous data point far away from the actual…
1
2
3
13 14