Skip to main content

Questions tagged [linear-interpolation]

Linear interpolation is the process of approximating intermediate values given an assumption that the ranges of missing data look roughly like straight lines.

linear-interpolation
0 votes
0 answers
20 views

custom linear interpolation in julia

I'm trying to make the following algorithm more concise: function tri_linear_interpolation(nx::Int, x::Vector{Float64}, ny::Int, y::Vector{Float64}, nz::Int, z::Vector{Float64}, f::Array{Float64, 3}, ...
RoosterCrossing's user avatar
0 votes
1 answer
43 views

How can I deal with passing 360 degrees when I linearly interpolate between two headings?

A part of my python program linearly interpolates between two compass headings. It works fine as long as I don't have to deal with passing through North. Is there a good way to deal with this rather ...
Phillip Dobbs's user avatar
1 vote
0 answers
69 views

linearly interpolate 1D array against n dimensional arrays over axis in parallel

Is there any way to interpolate an 1D array against two n-dimensional arrays along certain axis? In particular, I have x and y arrays with shapes (6, 2, 10). I also have an x_in array with shape(10, ) ...
GioR's user avatar
  • 626
-3 votes
1 answer
77 views

Highly oscillatory cubic spline interpolation for apparently smooth data [closed]

I tried all the different interpolation kinds of interp1d of scipy. It seems linear and slinear are the best, but they are obviously rough linear approximations and I need something smooth. I tried ...
mallelog1's user avatar
-1 votes
2 answers
58 views

Interpolation of data with pandas

I have several measured values, each in a time series. Time steps are unevenly distributed and also uneven between the data series. I'm trying to interpolate each series into a fixed 10 second time ...
mechanicalman's user avatar
0 votes
0 answers
37 views

How to linearly interpolate a missing row in R? [duplicate]

Let's assume I have a following data: library(dplyr) mydata <- expand_grid( sex = c("male","female"), age = 20:30, employed = c(T,F), value1 = (1:5)^2, ...
Aku-Ville Lehtimäki's user avatar
1 vote
1 answer
40 views

Looking to process 1d linear interpolation on a 3D gridded dataset

This is a follow-up question to an earlier question: Implementing 1D interpolation on a 3D Array in Numpy or Xarray Tsoil is a 3D xarray dataset with the following dimensions: <xarray.DataArray '...
arctic_climate_science's user avatar
0 votes
1 answer
40 views

How can I interpolate missing values based on the sum of the gap using pyspark?

I have a timeseries dataset with four fields, eg: user_id, timestamp, miles, and total_mileage. Miles would be the amount of miles driven in one time step, the total_mileage the mileage of the car at ...
vcarbijn's user avatar
1 vote
2 answers
103 views

What's the function object alternative to 1D linear interpolation with SciPy/NumPy?

I'm looking for a way to create a "functor" for linear interpolation of time,value pairs using SciPy (or NumPy) but according to the SciPy tutorial there is none! (Kind of the opposite of ...
pipe's user avatar
  • 672
1 vote
1 answer
90 views

Interpolate array along first axis with scipy

I'm struggling hard to perform a simple linear interpolation of a datacube of size Nx*Ny*Nz into a new one that would keep the other two dimensions constant i.e. the resulting output would be Nxnew*Ny*...
Georges Leukic's user avatar
0 votes
1 answer
82 views

Linear interpolation between data points onto a fixed y-grid

I want to use linear interpolation to create a finer dataset where my responses y are non-monotonic and I need to interpolate onto a fixed y-grid (this is not negotiable). I have a script that does ...
RandomYellow's user avatar
-2 votes
2 answers
88 views

MySQL Query for Spread/Difference of Energy Counter and missing Value interpolation

I have an energy counter (kWh) recorded in a MySQL database every 15 minutes. Sometimes the recording fails for several reasons (power outage, computer reboot for updates...) and values are missing. ...
Michael Uray's user avatar
0 votes
0 answers
32 views

C++ 3D software rasteriser depth buffer producing incorrect results

I have been recently implementing a 3D software rasteriser as part of my third year project. Currently I am implementing a depth buffer however I am getting odd results as shown in the picture (the ...
haqy84's user avatar
  • 1
0 votes
0 answers
32 views

Which function in R would do a piecewise linear interpolation per each row, using other variables?

Basically, I have this dataset with missing obs. So suppose we want to fill in missing data using the previous observation's Xs, and the average change for the Xs that exist for both the current and ...
BlackNinja's user avatar
0 votes
1 answer
70 views

Interpolating along a table of values

I have a dataframe with 5 columns (a, b, c, d, e, f). I then have specific values for columns a, b and c and need to interpolate along the dataframe to get values for columns d and e as well. As a ...
xylo's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
31