Discussion:
[jira] [Created] (MAHOUT-1935) Inefficient use of XtX calculation in Ordinary Least Squares
Trevor Grant (JIRA)
2017-02-03 16:41:51 UTC
Permalink
Trevor Grant created MAHOUT-1935:
------------------------------------

Summary: Inefficient use of XtX calculation in Ordinary Least Squares
Key: MAHOUT-1935
URL: https://issues.apache.org/jira/browse/MAHOUT-1935
Project: Mahout
Issue Type: Improvement
Affects Versions: 0.13.0
Reporter: Trevor Grant
Priority: Minor
Fix For: 0.13.0


In line 59 of OrdinaryLeastSquaresModel we calculate and collect XtX, but then don't bother to use it (so it is in essence calculated twice).

https://github.com/apache/zeppelin/blob/master/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
ASF GitHub Bot (JIRA)
2017-02-04 05:19:52 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15852604#comment-15852604 ]

ASF GitHub Bot commented on MAHOUT-1935:
----------------------------------------

GitHub user rawkintrevo opened a pull request:

https://github.com/apache/mahout/pull/277

MAHOUT-1935 fix double calculation of XtX

Collect XtX only once, and pass it to `solve`.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/rawkintrevo/mahout mahout-1935

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/mahout/pull/277.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #277

----
commit 470a5748e34cd085bc5e89d458aa3b136de46af4
Author: rawkintrevo <***@gmail.com>
Date: 2017-02-04T05:17:41Z

MAHOUT-1935 fix double calculation of XtX

----
Post by Trevor Grant (JIRA)
Inefficient use of XtX calculation in Ordinary Least Squares
------------------------------------------------------------
Key: MAHOUT-1935
URL: https://issues.apache.org/jira/browse/MAHOUT-1935
Project: Mahout
Issue Type: Improvement
Affects Versions: 0.13.0
Reporter: Trevor Grant
Priority: Minor
Labels: beginner
Fix For: 0.13.0
In line 59 of OrdinaryLeastSquaresModel we calculate and collect XtX, but then don't bother to use it (so it is in essence calculated twice).
https://github.com/apache/zeppelin/blob/master/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
Trevor Grant (JIRA)
2017-02-04 05:24:52 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Trevor Grant updated MAHOUT-1935:
---------------------------------
Description:
In line 59 of OrdinaryLeastSquaresModel we calculate and collect XtX, but then don't bother to use it (so it is in essence calculated twice).

~https://github.com/apache/zeppelin/blob/master/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java~

Not sure how that link got in there. It is unrelated.


was:
In line 59 of OrdinaryLeastSquaresModel we calculate and collect XtX, but then don't bother to use it (so it is in essence calculated twice).

https://github.com/apache/zeppelin/blob/master/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java
Post by Trevor Grant (JIRA)
Inefficient use of XtX calculation in Ordinary Least Squares
------------------------------------------------------------
Key: MAHOUT-1935
URL: https://issues.apache.org/jira/browse/MAHOUT-1935
Project: Mahout
Issue Type: Improvement
Affects Versions: 0.13.0
Reporter: Trevor Grant
Priority: Minor
Labels: beginner
Fix For: 0.13.0
In line 59 of OrdinaryLeastSquaresModel we calculate and collect XtX, but then don't bother to use it (so it is in essence calculated twice).
~https://github.com/apache/zeppelin/blob/master/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java~
Not sure how that link got in there. It is unrelated.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
Trevor Grant (JIRA)
2017-02-04 05:33:52 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Trevor Grant reassigned MAHOUT-1935:
------------------------------------

Assignee: Trevor Grant
Post by Trevor Grant (JIRA)
Inefficient use of XtX calculation in Ordinary Least Squares
------------------------------------------------------------
Key: MAHOUT-1935
URL: https://issues.apache.org/jira/browse/MAHOUT-1935
Project: Mahout
Issue Type: Improvement
Affects Versions: 0.13.0
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Labels: beginner
Fix For: 0.13.0
In line 59 of OrdinaryLeastSquaresModel we calculate and collect XtX, but then don't bother to use it (so it is in essence calculated twice).
~https://github.com/apache/zeppelin/blob/master/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java~
Not sure how that link got in there. It is unrelated.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
Trevor Grant (JIRA)
2017-02-04 05:34:51 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on MAHOUT-1935 started by Trevor Grant.
--------------------------------------------
Post by Trevor Grant (JIRA)
Inefficient use of XtX calculation in Ordinary Least Squares
------------------------------------------------------------
Key: MAHOUT-1935
URL: https://issues.apache.org/jira/browse/MAHOUT-1935
Project: Mahout
Issue Type: Improvement
Affects Versions: 0.13.0
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Labels: beginner
Fix For: 0.13.0
In line 59 of OrdinaryLeastSquaresModel we calculate and collect XtX, but then don't bother to use it (so it is in essence calculated twice).
~https://github.com/apache/zeppelin/blob/master/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java~
Not sure how that link got in there. It is unrelated.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
ASF GitHub Bot (JIRA)
2017-02-04 23:09:52 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15852975#comment-15852975 ]

ASF GitHub Bot commented on MAHOUT-1935:
----------------------------------------

Github user andrewpalumbo commented on the issue:

https://github.com/apache/mahout/pull/277

+1.. BTW you could also compute and cache it, (if it were actually needed the first time) to avoid recalculation of `X.t %*% X` down the line.
Post by Trevor Grant (JIRA)
Inefficient use of XtX calculation in Ordinary Least Squares
------------------------------------------------------------
Key: MAHOUT-1935
URL: https://issues.apache.org/jira/browse/MAHOUT-1935
Project: Mahout
Issue Type: Improvement
Affects Versions: 0.13.0
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Labels: beginner
Fix For: 0.13.0
In line 59 of OrdinaryLeastSquaresModel we calculate and collect XtX, but then don't bother to use it (so it is in essence calculated twice).
~https://github.com/apache/zeppelin/blob/master/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java~
Not sure how that link got in there. It is unrelated.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
ASF GitHub Bot (JIRA)
2017-02-07 04:04:41 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15855275#comment-15855275 ]

ASF GitHub Bot commented on MAHOUT-1935:
----------------------------------------

Github user asfgit closed the pull request at:

https://github.com/apache/mahout/pull/277
Post by Trevor Grant (JIRA)
Inefficient use of XtX calculation in Ordinary Least Squares
------------------------------------------------------------
Key: MAHOUT-1935
URL: https://issues.apache.org/jira/browse/MAHOUT-1935
Project: Mahout
Issue Type: Improvement
Affects Versions: 0.13.0
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Labels: beginner
Fix For: 0.13.0
In line 59 of OrdinaryLeastSquaresModel we calculate and collect XtX, but then don't bother to use it (so it is in essence calculated twice).
~https://github.com/apache/zeppelin/blob/master/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java~
Not sure how that link got in there. It is unrelated.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
Trevor Grant (JIRA)
2017-02-07 04:08:41 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Trevor Grant resolved MAHOUT-1935.
----------------------------------
Resolution: Fixed
Post by Trevor Grant (JIRA)
Inefficient use of XtX calculation in Ordinary Least Squares
------------------------------------------------------------
Key: MAHOUT-1935
URL: https://issues.apache.org/jira/browse/MAHOUT-1935
Project: Mahout
Issue Type: Improvement
Affects Versions: 0.13.0
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Labels: beginner
Fix For: 0.13.0
In line 59 of OrdinaryLeastSquaresModel we calculate and collect XtX, but then don't bother to use it (so it is in essence calculated twice).
~https://github.com/apache/zeppelin/blob/master/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java~
Not sure how that link got in there. It is unrelated.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
Hudson (JIRA)
2017-02-07 04:32:41 UTC
Permalink
[ https://issues.apache.org/jira/browse/MAHOUT-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15855307#comment-15855307 ]

Hudson commented on MAHOUT-1935:
--------------------------------

FAILURE: Integrated in Jenkins build Mahout-Quality #3416 (See [https://builds.apache.org/job/Mahout-Quality/3416/])
MAHOUT-1935 fix double calculation of XtX closes apache/mahout#277 (rawkintrevo: rev f4631528b6d017d974ed46d191651e1f7edbe6a7)
* (edit) math-scala/src/main/scala/org/apache/mahout/math/algorithms/regression/OrdinaryLeastSquaresModel.scala
Post by Trevor Grant (JIRA)
Inefficient use of XtX calculation in Ordinary Least Squares
------------------------------------------------------------
Key: MAHOUT-1935
URL: https://issues.apache.org/jira/browse/MAHOUT-1935
Project: Mahout
Issue Type: Improvement
Affects Versions: 0.13.0
Reporter: Trevor Grant
Assignee: Trevor Grant
Priority: Minor
Labels: beginner
Fix For: 0.13.0
In line 59 of OrdinaryLeastSquaresModel we calculate and collect XtX, but then don't bother to use it (so it is in essence calculated twice).
~https://github.com/apache/zeppelin/blob/master/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java~
Not sure how that link got in there. It is unrelated.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Loading...