【发布时间】:2021-06-30 05:51:28
【问题描述】:
谁能解释一下稀疏矩阵或CSC矩阵。
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].
上面的例子是从https://spark.apache.org/docs/1.6.1/api/java/org/apache/spark/mllib/linalg/SparseMatrix.html得到的
但是,我得到了什么是值和 RowIndices 但不了解 colpointer。谁能帮助我理解它。
【问题讨论】:
标签: python apache-spark pyspark sparse-matrix