[jira] Created: (MATH-314) New sparse vector implementation: int[] indices; double[] values;

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (MATH-314) New sparse vector implementation: int[] indices; double[] values;

ASF GitHub Bot (Jira)
New sparse vector implementation: int[] indices; double[] values;
-----------------------------------------------------------------

                 Key: MATH-314
                 URL: https://issues.apache.org/jira/browse/MATH-314
             Project: Commons Math
          Issue Type: New Feature
    Affects Versions: 2.0
         Environment: all
            Reporter: Jake Mannix
            Priority: Minor
             Fix For: 2.1


OpenMapRealVector is nice for fast random access, but if all you do with your sparse vectors is dot them together, add them onto dense vectors, and so forth, the representation as just an array of indices and an array of values is more compact, and faster (for these operations).  

It becomes prohibitive to do modification, however, so the usual thing is to have them be immutable - use an OpenMapRealVector while modifing, then seal them up into the constructor for an IntDoubleArrayVector form for fast iteration and so forth.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-314) New sparse vector implementation: int[] indices; double[] values;

ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/MATH-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794726#action_12794726 ]

Luc Maisonobe commented on MATH-314:
------------------------------------

As MATH-312 as been resolved recently, could you provide the patch you told us about ?

> New sparse vector implementation: int[] indices; double[] values;
> -----------------------------------------------------------------
>
>                 Key: MATH-314
>                 URL: https://issues.apache.org/jira/browse/MATH-314
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: 2.0
>         Environment: all
>            Reporter: Jake Mannix
>            Priority: Minor
>             Fix For: 2.1
>
>
> OpenMapRealVector is nice for fast random access, but if all you do with your sparse vectors is dot them together, add them onto dense vectors, and so forth, the representation as just an array of indices and an array of values is more compact, and faster (for these operations).  
> It becomes prohibitive to do modification, however, so the usual thing is to have them be immutable - use an OpenMapRealVector while modifing, then seal them up into the constructor for an IntDoubleArrayVector form for fast iteration and so forth.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-314) New sparse vector implementation: int[] indices; double[] values;

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/MATH-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794776#action_12794776 ]

Jake Mannix commented on MATH-314:
----------------------------------

Sure thing, let me make sure it's up-to-date and works in the general case.  I see there are some more RealVector methods which could be implemented in AbstractRealVector to cut down on cutting and pasting (isInfiniite(), isNan(), ebeXXX, projection, the norms).  

These are folded that into this patch, because otherwise all those methods are basically copy/pasted from the other vectors (they just use the iterators, which allows them to live in AbstractRealVector).  

My current patch for this isn't fully tested for all the mutating methods (in particular, growing efficiently is moderately nontrivial), but I'll try to whip it into shape.

> New sparse vector implementation: int[] indices; double[] values;
> -----------------------------------------------------------------
>
>                 Key: MATH-314
>                 URL: https://issues.apache.org/jira/browse/MATH-314
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: 2.0
>         Environment: all
>            Reporter: Jake Mannix
>            Priority: Minor
>             Fix For: 2.1
>
>
> OpenMapRealVector is nice for fast random access, but if all you do with your sparse vectors is dot them together, add them onto dense vectors, and so forth, the representation as just an array of indices and an array of values is more compact, and faster (for these operations).  
> It becomes prohibitive to do modification, however, so the usual thing is to have them be immutable - use an OpenMapRealVector while modifing, then seal them up into the constructor for an IntDoubleArrayVector form for fast iteration and so forth.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-314) New sparse vector implementation: int[] indices; double[] values;

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/MATH-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804223#action_12804223 ]

Luc Maisonobe commented on MATH-314:
------------------------------------

I don't remember the status of this issue yet.
Jake, did you provide another patch that I again forgot to apply ?

> New sparse vector implementation: int[] indices; double[] values;
> -----------------------------------------------------------------
>
>                 Key: MATH-314
>                 URL: https://issues.apache.org/jira/browse/MATH-314
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: 2.0
>         Environment: all
>            Reporter: Jake Mannix
>            Priority: Minor
>             Fix For: 2.1
>
>
> OpenMapRealVector is nice for fast random access, but if all you do with your sparse vectors is dot them together, add them onto dense vectors, and so forth, the representation as just an array of indices and an array of values is more compact, and faster (for these operations).  
> It becomes prohibitive to do modification, however, so the usual thing is to have them be immutable - use an OpenMapRealVector while modifing, then seal them up into the constructor for an IntDoubleArrayVector form for fast iteration and so forth.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-314) New sparse vector implementation: int[] indices; double[] values;

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/MATH-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804667#action_12804667 ]

Ted Dunning commented on MATH-314:
----------------------------------


I just asked Jake about this off-list and his reply was that this functionality has been incorporated in the Mahout math package.  This decreased his level of urgency below the critical level required to get a patch into good shape and he is reluctant to give you guys an 80% done patch since it would just increase the work for you.




> New sparse vector implementation: int[] indices; double[] values;
> -----------------------------------------------------------------
>
>                 Key: MATH-314
>                 URL: https://issues.apache.org/jira/browse/MATH-314
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: 2.0
>         Environment: all
>            Reporter: Jake Mannix
>            Priority: Minor
>             Fix For: 2.1
>
>
> OpenMapRealVector is nice for fast random access, but if all you do with your sparse vectors is dot them together, add them onto dense vectors, and so forth, the representation as just an array of indices and an array of values is more compact, and faster (for these operations).  
> It becomes prohibitive to do modification, however, so the usual thing is to have them be immutable - use an OpenMapRealVector while modifing, then seal them up into the constructor for an IntDoubleArrayVector form for fast iteration and so forth.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (MATH-314) New sparse vector implementation: int[] indices; double[] values;

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

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

Luc Maisonobe resolved MATH-314.
--------------------------------

    Resolution: Later

Closing problem for now as issuer doesn't need this feature anymore and as there are other sparse implementation available in commons-math for general use.
Will be implemented later if someone else asks again for it.

> New sparse vector implementation: int[] indices; double[] values;
> -----------------------------------------------------------------
>
>                 Key: MATH-314
>                 URL: https://issues.apache.org/jira/browse/MATH-314
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: 2.0
>         Environment: all
>            Reporter: Jake Mannix
>            Priority: Minor
>             Fix For: 2.1
>
>
> OpenMapRealVector is nice for fast random access, but if all you do with your sparse vectors is dot them together, add them onto dense vectors, and so forth, the representation as just an array of indices and an array of values is more compact, and faster (for these operations).  
> It becomes prohibitive to do modification, however, so the usual thing is to have them be immutable - use an OpenMapRealVector while modifing, then seal them up into the constructor for an IntDoubleArrayVector form for fast iteration and so forth.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (MATH-314) New sparse vector implementation: int[] indices; double[] values;

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

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

Phil Steitz closed MATH-314.
----------------------------


> New sparse vector implementation: int[] indices; double[] values;
> -----------------------------------------------------------------
>
>                 Key: MATH-314
>                 URL: https://issues.apache.org/jira/browse/MATH-314
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: 2.0
>         Environment: all
>            Reporter: Jake Mannix
>            Priority: Minor
>             Fix For: 2.1
>
>
> OpenMapRealVector is nice for fast random access, but if all you do with your sparse vectors is dot them together, add them onto dense vectors, and so forth, the representation as just an array of indices and an array of values is more compact, and faster (for these operations).  
> It becomes prohibitive to do modification, however, so the usual thing is to have them be immutable - use an OpenMapRealVector while modifing, then seal them up into the constructor for an IntDoubleArrayVector form for fast iteration and so forth.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.