Vectors

A vector is a mathematical object described as an ordered set of numbers. It is similar to a Set, except that order is maintained in vectors. All members are part of real numbers. A vector having dimension n is geometrically represented as a point in n-dimensional space. The origin of a vector starts from zero.

Example:

[2, 4, 5, 9, 10][3.14159, 2.718281828, −1.0, 2.0][1.0, 1.1, 2.0]

Get Machine Learning with Spark - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.