Mar 14, 2020 in Spark Sql
Q: Explain about sparse vector in Spark

1 Answer

0 votes
Mar 14, 2020

The purpose of a sparse vector is to store non-zero entries for space-saving. Sparse vector has two parallel ways.

One vector is for indices

Another is for values

Example:

Vectors.sparse(4,Array(0,1,2,3),Array(2706d,40000d,300d,2.0,2.0,2003,86065)

Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

0 votes
Mar 14, 2020 in Spark Sql
...