Time series in Scala
The overwhelming majority of examples used to illustrate the different machine algorithms in this book deal with time series or sequential, time-ordered set of observations.
Types and operations
The Primitives types section under Source code in Chapter 1, Getting Started, introduced the types for a time series of a single XSeries[T]
variable and multiple XVSeries[T]
variables.
A time series of observations is a vector (a Vector
type) of observation elements of the following types:
A
T
type in the case of a single variable/feature observationAn
Array[T]
type for observations with more than one variable/feature
A time series of labels or expected values is a single variable vector for which elements may have a primitive Int
type for classification and Double
for regression.
A time series of labeled observations is a pair of a vector of observations and a vector of labels:
![](https://static.packt-cdn.com/products/9781783558742/graphics/8742OS_03_A.jpg)
Visualization of the single features and multi-feature observations
The two generic XSeries
and XVSeries
types...