[
https://issues.apache.org/jira/browse/MAHOUT-1838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15264701#comment-15264701
]
ASF GitHub Bot commented on MAHOUT-1838:
----------------------------------------
Github user andrewpalumbo commented on a diff in the pull request:
https://github.com/apache/mahout/pull/229#discussion_r61641870
--- Diff: examples/bin/spark-shell-plot.mscala ---
@@ -0,0 +1,19 @@
+import org.apache.mahout.visualization.mplot2d
+
+val mxRnd = Matrices.symmetricUniformView(5000000, 2, 1234)
+val drmRand = drmParallelize(mxRnd)
+
+val drmSin = drmRand.mapBlock() {case (keys, block) =>
+ val blockB = block.like()
+ for (i <- 0 until block.nrow) {
+ blockB(i, 0) = block(i, 0)
+ blockB(i, 1) = Math.sin((block(i, 0) * 8))
+ }
+ keys -> blockB
+}
+
+new mplot2d(drmRand, samplePercent = 10)
--- End diff --
changed the default sample size to 1%
> Provide and plotting capabilities for Mahout mtrices and DRMs
> --------------------------------------------------------------
>
> Key: MAHOUT-1838
> URL: https://issues.apache.org/jira/browse/MAHOUT-1838
> Project: Mahout
> Issue Type: New Feature
> Components: visiualization
> Affects Versions: 0.12
> Reporter: Andrew Palumbo
> Assignee: Andrew Palumbo
> Fix For: 0.13
>
> Attachments: drmSamplePlot2d.png
>
>
> Add basic 2d and 3d plotting capabilities to Mahout using the Smile library:
> https://github.com/haifengl/smile
> I've prototyped an {{mplot2d}} class here to sample a certain percentage of a
> DRM's data using {{drmSampleKRows()}} and to create a 2d plot from the
> resulting x,y coordinate matrix, and tested from the spark-shell as a POC.
> Extending to 3d should be trivial:
> The Smile-Plot library has some very nice plotting features, all of which can
> easily integrated into mahout:
> http://haifengl.github.io/smile/index.html#gallery
> http://haifengl.github.io/smile/index.html#visualization
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)