Github user MrBago commented on a diff in the pull request:
https://github.com/apache/spark/pull/19588#discussion_r152442655
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/feature/VectorIndexer.scala ---
@@ -311,22 +342,39 @@ class VectorIndexerModel private[ml] (
// TODO: Check more carefully about whether this whole class will be
included in a closure.
/** Per-vector transform function */
- private val transformFunc: Vector => Vector = {
+ private lazy val transformFunc: Vector => Vector = {
--- End diff --
Can I ask about the lazy val here? What happens here if a user sets the
params, calls transform, modifies one of the params, and then calls transform
again? Is that a concern?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]