GitHub user WeichenXu123 opened a pull request:
https://github.com/apache/spark/pull/14898
[SPARK-16499][ML][MLLib] optimize ann algorithm where using ApplyInPlace
function
## What changes were proposed in this pull request?
replace
`ApplyInPlace(output, target, delta, (o: Double, t: Double) => o - t)`
with
`
delta := output
delta -= target
`
like what is done in https://github.com/apache/spark/pull/14156
in that PR the `ApplyInPlace` cannot be optimized because the function may
be anything.
but here we know that it is only matrix substraction so we can directly
using breeze matrix operator
to get better performance than using `ApplyInPlace`.
## How was this patch tested?
Existing test.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/WeichenXu123/spark ann_compute_optim
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/14898.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 #14898
----
commit 9bf127a511650cc71b23a904f7beb6f462bbd47e
Author: WeichenXu <[email protected]>
Date: 2016-08-30T15:36:58Z
update.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]