Skip to content

[SPARK-7194][MLLIB] Vectors factors method for sparse vectors should accept the output of zipWithIndex - #5766

Closed
kaka1992 wants to merge 2 commits into
apache:masterfrom
kaka1992:add_new_sparse
Closed

[SPARK-7194][MLLIB] Vectors factors method for sparse vectors should accept the output of zipWithIndex#5766
kaka1992 wants to merge 2 commits into
apache:masterfrom
kaka1992:add_new_sparse

Conversation

@kaka1992

Copy link
Copy Markdown
Contributor

Add a new Vectors.sparse(arr: Array[Double])

@AmplabJenkins

Copy link
Copy Markdown

Can one of the admins verify this patch?

@mengxr

mengxr commented Apr 29, 2015

Copy link
Copy Markdown
Contributor

@kaka1992 I don't see why this is useful. Creating a dense vector directly is certainly more efficient.

@kaka1992

Copy link
Copy Markdown
Contributor Author

@mengxr Just provide a way to turn DeseV to SparseV easily. Somebody may need this.

@mengxr

mengxr commented Apr 29, 2015

Copy link
Copy Markdown
Contributor

See #5756. Users should be able to write Vectors.dense(1.0, 0.0, 3.0).toSparse.

@kaka1992

Copy link
Copy Markdown
Contributor Author

@mengxr Ok, I'll close this pr.

@kaka1992 kaka1992 closed this Apr 29, 2015
@srowen

srowen commented Apr 29, 2015

Copy link
Copy Markdown
Member

@kaka1992 this wasn't quite the proposal in the JIRA anyway; it had to do with accepting either order of tuple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants