biolab / orange3-timeseries

🍊 :chart_with_upwards_trend: Orange add-on for analyzing, visualizing, manipulating, and forecasting time series data.
Other
62 stars 41 forks source link

Interpolation does not consider the time-variable #136

Closed WoifeG closed 4 years ago

WoifeG commented 4 years ago
Timeseries version

0.3.7

Orange version

3.xx

Expected behavior

I would expect interpolation to take the time-distance from data-entries into account. For the given example, this would mean that the interpolated values would be 16, 18, 20.

Actual behavior

Interpolation is independent on the timevariable distance. This results in wrong interpolation values for irregular timed entries.

Steps to reproduce the behavior

Use the provided Dataset and Interpolation widget.

Additional info (worksheets, data, screenshots, ...)

data interp_sp

kernc commented 4 years ago

This seems the offending linear x axis: https://github.com/biolab/orange3-timeseries/blob/f4f7934f6cc55774342cce46ad2f1fef7c692cfd/orangecontrib/timeseries/functions.py#L274 It should instead probably be Timeseries(data).time_values: https://github.com/biolab/orange3-timeseries/blob/f4f7934f6cc55774342cce46ad2f1fef7c692cfd/orangecontrib/timeseries/timeseries.py#L201-L207

Care to make a PR for it?

WoifeG commented 4 years ago

Hi, thanks, that is exactly the issue. I will work on the fix and make a PR in the next days, currently busy with a lot of other stuff.