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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.