Apache Spark 2.x Machine Learning Cookbook
上QQ阅读APP看书,第一时间看更新

Creating dense matrix and setup with Spark 2.0

In this recipe, we explore matrix creation examples that you most likely would need in your Scala programming and while reading the source code for many of the open source libraries for machine learning.

Spark provides two distinct types of local matrix facilities (dense and sparse) for storage and manipulation of data at a local level. For simplicity, one way to think of a matrix is to visualize it as columns of Vectors.