Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Values #1353

Open
wants to merge 85 commits into
base: master
Choose a base branch
from
Open

Missing Values #1353

wants to merge 85 commits into from

Conversation

randomboolean
Copy link
Contributor

@randomboolean randomboolean commented Mar 8, 2024

New Functionalities

The proposed enhancements extend the FILL operation to support univariate operations, filling missing timestamps within individual GTS based on specified gaps or empty buckets.

This approach fills existing functionality gaps:

  • the inability of bucketize fillers to utilize filler functions or to fill beyond empty buckets.
  • the inability of existing filler functions and FILL framework to be used beyond cross filling use cases.

Function Signatures

  • Existing Signature: Maintains the original functionality, aligning two GTS by filling to match their timestamps.
gtsa gtsb filler FILL
  • New Signatures: Introduce univariate filling, with optional parameter for specific gaps (ticks) or empty buckets.
[ gtsList filler ] FILL

[ gtsList filler ticks ] FILL

gtsList {
  'filler' filler
  // optional:
  'ticks' ticks
  'invalid.value' NULL
} FILL

Note that the optional parameter invalid.value is the value returned by the evaluation function if the input timestamp is not in the function's support.

Additional Fillers

  • filler.linear
  • filler.spline
  • filler.akima
  • filler.newton
  • filler.lowess
  • filler.rlowess

MACROFILLER

When used in the context of the new univariate FILL mode, the macro encapsulated by MACROFILLER should be presented only with elements from the specified GTS, unlike in cross fill operations where it also receives elements from another GTS. The documentation will be revised to reflect this usage.

Macros as Filler Parameter

We have introduced the capability to use a macro directly as a filler parameter, (similar to a lambda filler function). In this setup, the macro must be designed to expect a GTS and a tick, and to return the filler value.

Copy link
Contributor

@pi-r-p pi-r-p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To discuss: deduplication issues.
It can just fail, or deduplicate silently:

  • with the full DEDUP logic ?
  • with a SORT ?
    Failing is simpler, and dedups are easy to check after sort.

@hbs hbs requested a review from pi-r-p April 3, 2024 12:02
@randomboolean randomboolean changed the title Interpolate Missing Values Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants