Skip to content

[SPARK-24628][DOC]Typos of the example code in docs/mllib-data-types.md - #21612

Closed
huangweizhe123 wants to merge 2 commits into
apache:masterfrom
huangweizhe123:my_change
Closed

[SPARK-24628][DOC]Typos of the example code in docs/mllib-data-types.md#21612
huangweizhe123 wants to merge 2 commits into
apache:masterfrom
huangweizhe123:my_change

Conversation

@huangweizhe123

@huangweizhe123huangweizhe123 commented Jun 22, 2018

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

The example wants to create a dense matrix ((1.0, 2.0), (3.0, 4.0), (5.0, 6.0)), but the list is given as [1, 2, 3, 4, 5, 6]. Now it is changed as [1, 3, 5, 2, 4, 6].

And the example wants to create an RDD of coordinate entries like:
entries = sc.parallelize([(0, 0, 1.2), (1, 0, 2.1), (2, 1, 3.7)]).
However, it is done with the MatrixEntry class like:
entries = sc.parallelize([MatrixEntry(0, 0, 1.2), MatrixEntry(1, 0, 2.1), MatrixEntry(6, 1, 3.7)]),
where the third MatrixEntry has a different row index.
Now it is changed as MatrixEntry(2, 1, 3.7).

How was this patch tested?

This is trivial enough that it should not affect tests.

Author: Weizhe Huang huangweizhe@bbdservice.com

Please review http://spark.apache.org/contributing.html before opening a pull request.

@huangweizhe123

Copy link
Copy Markdown
ContributorAuthor

ok to test

@huangweizhe123huangweizhe123 changed the title [SPARK-24628][MLlib]If you want to create a dense matrix ((1.0, 2.0), (3.0, 4.0), (5.0, 6…[SPARK-24628][DOC]If you want to create a dense matrix ((1.0, 2.0), (3.0, 4.0), (5.0, 6…Jun 25, 2018
@huangweizhe123huangweizhe123 changed the title [SPARK-24628][DOC]If you want to create a dense matrix ((1.0, 2.0), (3.0, 4.0), (5.0, 6…[SPARK-24628][DOC]Typos in docs/mllib-data-types.mdJun 25, 2018
@huangweizhe123huangweizhe123 changed the title [SPARK-24628][DOC]Typos in docs/mllib-data-types.md[SPARK-24628][DOC]Typos of the example code in docs/mllib-data-types.mdJun 25, 2018
@huangweizhe123

Copy link
Copy Markdown
ContributorAuthor

Jenkins, retest this please

@huangweizhe123

Copy link
Copy Markdown
ContributorAuthor

cc @gatorsmile@marmbrus It seems that no one is gonna test this patch. Do I need to ask someone to add Spark QA as a participant?

@srowen

Copy link
Copy Markdown
Member

Merged to master

Sign up for freeto 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.

2 participants

@huangweizhe123@srowen