flink-issues 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] (FLINK-1718) Add sparse vector and sparse matrix types to machine learning library
Date Fri, 27 Mar 2015 16:17:53 GMT

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

ASF GitHub Bot commented on FLINK-1718:
---------------------------------------

Github user rmetzger commented on a diff in the pull request:

    https://github.com/apache/flink/pull/539#discussion_r27307815
  
    --- Diff: flink-staging/flink-ml/src/main/scala/org/apache/flink/ml/math/DenseVector.scala
---
    @@ -67,7 +63,25 @@ case class DenseVector(val values: Array[Double]) extends Vector {
        * @return Copy of the vector instance
        */
       override def copy: Vector = {
    -    DenseVector(values.clone())
    +    DenseVector(data.clone())
    +  }
    +
    +  /** Updates the element at the given index with the provided value
    +    *
    +    * @param index
    +    * @param value
    +    */
    +  override def update(index: Int, value: Double): Unit = {
    +    require(0 <= index && index < data.length, s"Index $index is out of
bounds " +
    --- End diff --
    
    Might be inefficient.


> Add sparse vector and sparse matrix types to machine learning library
> ---------------------------------------------------------------------
>
>                 Key: FLINK-1718
>                 URL: https://issues.apache.org/jira/browse/FLINK-1718
>             Project: Flink
>          Issue Type: New Feature
>          Components: Machine Learning Library
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>              Labels: ML
>
> Currently, the machine learning library only supports dense matrix and dense vectors.
For future algorithms it would be beneficial to also support sparse vectors and matrices.
> I'd propose to use the compressed sparse column (CSC) representation, because it allows
rather efficient operations compared to a map backed sparse matrix/vector implementation.
Furthermore, this is also the format the Breeze library expects for sparse matrices/vectors.
Thus, it is easy to convert to a sparse breeze data structure which provides us with many
linear algebra operations.
> BIDMat [1] uses the same data representation.
> Resources:
> [1] [https://github.com/BIDData/BIDMat]



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

Mime
View raw message