case class TimeSeries[V](idx: Vector[LocalDateTime], ds: Vector[V]) extends Product with Serializable
TimeSeries contains data indexed by DateTime. The type of stored data is parametric.
- Alphabetic
- By Inheritance
- TimeSeries
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addMissing(delta: Duration, f: ((LocalDateTime, V), (LocalDateTime, V), LocalDateTime) ⇒ V): TimeSeries[V]
Add missing points to the time series.
Add missing points to the time series. The output series will have all its own points and some new points if there are missing at every duration.
- delta
Expected distance between points
- f
This function will approximate missing points.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- val dataPoints: Vector[(LocalDateTime, V)]
- val ds: Vector[V]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
filter(f: ((LocalDateTime, V)) ⇒ Boolean): TimeSeries[V]
Filter by index and value
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get(i: Int)(implicit num: Numeric[V]): V
Safe get.
Safe get. If element is out of the bounds then 0 is returned
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
groupByTime(g: (LocalDateTime) ⇒ LocalDateTime, f: (Seq[(LocalDateTime, V)]) ⇒ V): TimeSeries[V]
Aggregate data points.
Aggregate data points.
- g
This function transforms current data point time into new time. All points with the same time will be integrated into single point
- f
This function defines how to aggregate points with the same transformed time
- def head: Option[(LocalDateTime, V)]
- val idx: Vector[LocalDateTime]
- val index: Vector[LocalDateTime]
-
def
interpolateOutliers(min: V, max: V, f: (V, V) ⇒ V)(implicit num: Numeric[V]): TimeSeries[V]
Remove outliers by interpolate values on their place
-
def
isEmpty: Boolean
Check is series is empty
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
join[U](ts: TimeSeries[U]): TimeSeries[(V, U)]
Inner join.
Inner join. Only include points which have the same data in both series
-
def
joinLeft[U](ts: TimeSeries[U], default: U): TimeSeries[(V, U)]
Left join.
Left join. If right series doesn't have a data point then put default value.
-
def
last: Option[(LocalDateTime, V)]
Get last element of the series
- val length: Int
-
def
map(f: ((LocalDateTime, V)) ⇒ V): TimeSeries[V]
Map by index and value.
Map by index and value. Create new values
-
def
mapValues[U](f: (V) ⇒ U): TimeSeries[U]
Map over values.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nonEmpty: Boolean
Check is series is non empty
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
removeOutliers(min: V, max: V)(implicit num: Numeric[V]): TimeSeries[V]
Remove outliers
-
def
repeat(start: LocalDateTime, end: LocalDateTime, d: Duration): TimeSeries[V]
Repeat series
-
def
resample(delta: Duration, f: ((LocalDateTime, V), (LocalDateTime, V), LocalDateTime) ⇒ V)(implicit num: Numeric[V]): TimeSeries[V]
Resample given TimeSeries with indexes separated by delta.
Resample given TimeSeries with indexes separated by delta. This function will ensure that series is evenly spaced.
- delta
Distance between points
- f
Function which approximates missing points
-
def
resampleWithDefault(delta: Duration, default: V)(implicit num: Fractional[V]): TimeSeries[V]
Resample series.
Resample series. If there are any missing points then they will be replaced by given default value
-
def
rollingWindow(windowSize: Duration, f: (Seq[V]) ⇒ V): TimeSeries[V]
Rolling window operation
-
def
shiftTime(d: Duration, forward: Boolean): TimeSeries[V]
Shift index by specific time duration
-
def
slice(start: LocalDateTime, end: LocalDateTime): TimeSeries[V]
Get slice of series with left side inclusive and right side exclusive this operation is based on index.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
trimOutliers(min: V, max: V)(implicit num: Numeric[V]): TimeSeries[V]
Remove outliers by set min/max values on their place
- val values: Vector[V]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )