question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TimeSeries.values or method addition

See original GitHub issue

Looking at the usecase of tracing measurements of a process (e.g. production of paperclips over time) a user might be interested in values primarily in some cases (e.g. to compute the total amount of paperclips produced).

ts._d.values()
sum(ts._d.values())

I’d suggest to implement something similar to the following:

def values(self):
        """Return a list of all values in the time series (without time information)."""
        return self._d.values()

Wdyt? Are there other aspects to consider?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
johnhaire89commented, Mar 1, 2021

Apologies for the tone of my previous comments, for answering without understanding what was being discussed, and for the thought bubble about pint =) I’m not sure if I’m adding anything beneficial to the thread, but I’m OK with the suggestion.

0reactions
ThomDietrichcommented, Feb 19, 2021

Hey @johnhaire89 I generally agree with you on most points. I disagree on units and that pint is the better alternative. I used pint before but it’s not comparable to what we are trying here. I think your approach to require a unit is one-sided. In the simple example from above, data points would not be samples of a continuous process. So instead of “5213 paperclips per hour” I would rather say “5213 paperclips since the last sample”. The problem is imho perfectly described by @nsteins in the proposal to implement a EventSeries.

Adding another view to this: @stringertheory suggested a new series class for this. Imho that’s a question of philosophy behind traces. Is an object purpose driven or universal? As a counter example: You might be familiar with InfluxDB measurements. Think of them as tables in a database specifically architected for time series data. A whole set of statistical functions can be used to query, slice, join, and aggregate data. InfluxDB does not concern itself with the nature of your datapoints and therefore whether the sum or integral functions are meaningful for your use case is really just up to you and your use case.

How do you guys feel about this different perspective?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Time Series Objects and Collections - MATLAB & Simulink
A data sample consists of one or more values associated with a specific time in the timeseries object. The number of data samples...
Read more >
Time Series Analysis in Forecasting Mental Addition ... - NCBI
Time series forecasting may provide objective metrics for predictive performance in mental arithmetic. Addition and summation (addition ...
Read more >
The Mathematics of of Time-Series Analysis
In this way, so long as u(t) is fully specified, it is possible to generate any number of the succeeding elements of the...
Read more >
Time series - Wikipedia
In addition, time series models will often make use of the natural one-way ordering of time so that values for a given period...
Read more >
The Complete Guide to Time Series Analysis and Forecasting
This is a hint for seasonality, and you can find its value by finding the ... This method extends double exponential smoothing, by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found