Exploring distributed BlockMatrix in Spark 2.0

In this recipe, we explore BlockMatrix, which is a nice abstraction and a placeholder for the block of other matrices. In short, it is a matrix of other matrices (matrix blocks) which can be accessed as a cell.

We take a quick look at a simplified code snippet by converting the CoordinateMatrix to a BlockMatrix and then do a quick check for its validity and access one of its properties to show that it was set up properly. BlockMatrix code takes longer to set up and it needs a real life application (not enough space) to demonstrate and show its properties in action.

Get Apache Spark 2.x Machine Learning Cookbook 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.