mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAHOUT-1838) Provide and plotting capabilities for Mahout mtrices and DRMs
Date Fri, 29 Apr 2016 20:24:12 GMT

    [ https://issues.apache.org/jira/browse/MAHOUT-1838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15264677#comment-15264677
] 

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_r61639396
  
    --- Diff: math-scala/src/main/scala/org/apache/mahout/visualization/mplot2d.scala ---
    @@ -0,0 +1,69 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.mahout.visualization
    +
    +import java.awt.{BorderLayout, Color}
    +import java.io.File
    +import javax.swing.JFrame
    +
    +import org.apache.mahout.math._
    +import scalabindings._
    +import RLikeOps._
    +import drm._
    +import smile.plot._
    +
    +import scala.collection.JavaConversions._
    +
    +
    +/**
    +  * Create a s scatter plot of a DRM by sampling a given percentage
    +  * and plotting corresponding points of (drmXY(::,0),drmXY(::,2))
    +  *
    +  * @param drmXY a m x 2 Drm drm to plot
    +  * @param samplePercent the percentage the drm to sample
    +  * @tparam K
    +  */
    +class mplot2d[K](drmXY: DrmLike[K], samplePercent: Int = 10, setVisible: Boolean = true)
 {
    +     val drmSize = drmXY.checkpoint().numRows()
    --- End diff --
    
    @smarthi sample percent is user defined here.


> 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)

Mime
View raw message