You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Rosstin Murphy (JIRA)" <ji...@apache.org> on 2015/06/30 01:43:04 UTC

[jira] [Updated] (SPARK-8717) Update mllib-data-types docs to include missing "matrix" Python examples

     [ https://issues.apache.org/jira/browse/SPARK-8717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rosstin Murphy updated SPARK-8717:
----------------------------------
    Description: 
Currently, the documentation for MLLib Data Types (docs/mllib-data-types.md in the repo, https://spark.apache.org/docs/latest/mllib-data-types.html in the latest online docs) stops listing Python examples at "Labeled point".

"Local vector" and "Labeled point" have Python examples, however none of the "matrix" entries have Python examples.

The "matrix" entries could be updated to include python examples.

I'm not 100% sure that all the matrices currently have implemented Python equivalents, but I'm pretty sure that at least the first one ("Local matrix") could have an entry.

<div data-lang="python" markdown="1">
The base class of local matrices is
[`Matrix`](api/python/pyspark.mllib.html#pyspark.mllib.linalg.Matrix), and we provide the
implementation: [`DenseMatrix`](api/python/pyspark.mllib.html#pyspark.mllib.linalg.DenseMatrix).

{% highlight python %}
from pyspark.mllib.linalg import DenseMatrix

# Create a dense matrix ((1.0, 2.0), (3.0, 4.0), (5.0, 6.0))
dm = DenseMatrix(3, 2, [1.0, 3.0, 5.0, 2.0, 4.0, 6.0])
{% endhighlight %}
</div>

  was:
Currently, the documentation for MLLib Data Types (docs/mllib-data-types.md in the repo, https://spark.apache.org/docs/latest/mllib-data-types.html in the latest online docs) stops listing Python examples at "Labeled point".

"Local vector" and "Labeled point" have Python examples, however none of the "matrix" entries have Python examples.

The "matrix" entries could be updated to include python examples.


> Update mllib-data-types docs to include missing "matrix" Python examples
> ------------------------------------------------------------------------
>
>                 Key: SPARK-8717
>                 URL: https://issues.apache.org/jira/browse/SPARK-8717
>             Project: Spark
>          Issue Type: Documentation
>            Reporter: Rosstin Murphy
>            Priority: Minor
>
> Currently, the documentation for MLLib Data Types (docs/mllib-data-types.md in the repo, https://spark.apache.org/docs/latest/mllib-data-types.html in the latest online docs) stops listing Python examples at "Labeled point".
> "Local vector" and "Labeled point" have Python examples, however none of the "matrix" entries have Python examples.
> The "matrix" entries could be updated to include python examples.
> I'm not 100% sure that all the matrices currently have implemented Python equivalents, but I'm pretty sure that at least the first one ("Local matrix") could have an entry.
> <div data-lang="python" markdown="1">
> The base class of local matrices is
> [`Matrix`](api/python/pyspark.mllib.html#pyspark.mllib.linalg.Matrix), and we provide the
> implementation: [`DenseMatrix`](api/python/pyspark.mllib.html#pyspark.mllib.linalg.DenseMatrix).
> {% highlight python %}
> from pyspark.mllib.linalg import DenseMatrix
> # Create a dense matrix ((1.0, 2.0), (3.0, 4.0), (5.0, 6.0))
> dm = DenseMatrix(3, 2, [1.0, 3.0, 5.0, 2.0, 4.0, 6.0])
> {% endhighlight %}
> </div>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org