1
火花文檔,創建pyspark.ml.linalg.SparseMatrix
說:如何使用Spark創建稀疏的CSCMatrix?
Column-major sparse matrix. The entry values are stored in Compressed
Sparse Column (CSC) format. For example, the following matrix
1.0 0.0 4.0
0.0 3.0 5.0
2.0 0.0 6.0
is stored as values: [1.0, 2.0, 3.0, 4.0, 5.0, 6.0],
rowIndices=[0, 2, 1, 0, 1, 2],
colPointers=[0, 2, 3, 6]
你能解釋我們如何得出colPointers
?它表示它們代表了與新專欄開頭相對應的索引,但我仍然無法用頭圍住它。