Github user yanboliang commented on a diff in the pull request:
https://github.com/apache/spark/pull/13461#discussion_r65667135
--- Diff: mllib/src/main/scala/org/apache/spark/ml/util/ReadWrite.scala ---
@@ -139,12 +144,27 @@ trait MLWritable {
def save(path: String): Unit = write.save(path)
}
-private[ml] trait DefaultParamsWritable extends MLWritable { self: Params
=>
+/**
+ * :: Experimental ::
+ *
+ * Helper trait for making simple [[Params]] types writable. If a
[[Params]] class stores
+ * all data as [[org.apache.spark.ml.param.Param]] values, then extending
this trait will provide
+ * a default implementation of writing saved instances of the class.
+ * This only handles simple [[org.apache.spark.ml.param.Param]] types;
e.g., it will not handle
+ * [[org.apache.spark.sql.Dataset]] or
[[org.apache.spark.ml.linalg.Vector]].
--- End diff --
Further more, ```ElementwiseProduct``` has the param ```scalingVec``` whose
type is ```Vector``` and can be save/load.
```
val scalingVec: Param[Vector] = new Param(this, "scalingVec", "vector for
hadamard product")
```
---
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]