Github user Mageswaran1989 commented on a diff in the pull request:
https://github.com/apache/spark/pull/7357#discussion_r38063538
--- Diff: mllib/src/main/scala/org/apache/spark/mllib/linalg/Vectors.scala
---
@@ -692,6 +744,29 @@ class SparseVector @Since("1.0.0") (
private[spark] override def toBreeze: BV[Double] = new
BSV[Double](indices, values, size)
+ private[spark] override def mapActiveValues(f: Double => Double): Vector
=
+ new SparseVector(size, indices.clone(), values.map(f))
+
+ private[spark] def mapActivePairs(f: (Int, Double) => Double): Vector = {
--- End diff --
I am learning Scala. Could you please explain how this maps only the active
pairs?
what is happening in the line no: 756
---
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]