Book Image

Scala for Machine Learning

By : Patrick R. Nicolas
Book Image

Scala for Machine Learning

By: Patrick R. Nicolas

Overview of this book

Table of Contents (20 chapters)
Scala for Machine Learning
About the Author
About the Reviewers

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 observation

  • An 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:

Visualization of the single features and multi-feature observations

The two generic XSeries and XVSeries types...