Giter Site home page Giter Site logo

timeseries's Issues

Improve functions efficiency

1. Measure: map
100000 points: 10.568595 ms.
500000 points: 55.22252 ms.
1000000 points: 45.036296 ms.

2. Measure: groupBy
100000 points: 339.662496 ms.
500000 points: 2098.315767 ms.
1000000 points: 5014.337623 ms.

3. Measure: rollingWindow
1000 points: 23.720139 ms.
5000 points: 597.484543 ms.
10000 points: 2347.1362 ms.

Add the possiblity to merge 2 series

Series are merged on index.
This operation merges series A into B which means that, the output series will contain all values from B and all from A not presented in B (values from B overwrites values in A)

Add session finder

Add object Analysis with function:

def findSessions[V: Fractional](ts: TimeSeries[V]): Seq[Session]

Where session contains start and end date.
Session is defined as period where values are > 0.
For example in a given series values:
1, 3, 2, 0, 4,5
We have 2 sessions (0,3) and (4,6) (startIndex, endIndex)
End date is on the first sample where the value is == 0

Add TimeConverter

  • mkCronLike function to parse cron
  • mkConvert function which convert custom cron type, like:

mkConvert(c: CronLike): LocalDateTime => LocalDateTime

repeat

Repeat series for given period

Add join for 2 series

Join should work on index and the output value is tuple with values from first and second series

integrateByTime

Integrate series for selected time ranges.
Example:
Lets say that we have series with data every 15 minutes.
(10:00, 1), (10:15, 2), (10:30, 3), (10:45, 4), (11:00, 5), (11:15, 6)
And we want to integrate it for every hour. So we expected the following series:
(10:00, 1), (10:15, 3), (10:30, 6), (10:45, 10), (11:00, 5), (11:15, 11)

The sum is reseted after every hour

Update function parameter in groupByTime

Change

def groupByTime(g: LocalDateTime => LocalDateTime, f: Seq[V] => V): TimeSeries[V]

to
def groupByTime(g: LocalDateTime => LocalDateTime, f: Seq[(LocalDateTime, V)] => V): TimeSeries[V]

Implemented overflow differentiate

This function is motivated by the following use case:

Older sensor equipment often used simple counters to record events. These counters would continue to some max value (i.e. 100) and then rollover to 0

Refactor integrateByTime function

Currently this function takes as a parameter Duration.
Instead it should take function LocalDateTime => LocalDateTime and reset to 0 when transformed DateTime has new value.
This transformation is used only to find switch point. The index will remain the same.

Add session finder with tolerance

Add a new (version of) findSessions function to Sessions object, with the following signature

def findSessions[V: Numeric](ts: TimeSeries[V], maxTolerance: Duration): Seq[Session]

where Duration is java.time.Duration, which works exactly as
def findSessions[V: Numeric](ts: TimeSeries[V]): Seq[Session]
with the additional tolerance of non-positive samples for at most maxDuration window.

Add outer join

def joinOuter[U](ts: TimeSeries[U], defaultLeft: V, defaultRight: U): TimeSeries[(V, U)]

This join will work similar to SQL full outer join

Add last

Add a function which give a last element of TimeSeries.

New repeat function

def repeat(start: Instant, end: Instant, repetitionStart: Instant, repetitionEnd: Instant): TimeSeries[V] 

Add prediction engine

  • Implement as separate module.
  • Allow to specify range for prediction
  • Use different models.
  • Add benchmarks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.