GitHub user hhbyyh opened a pull request: https://github.com/apache/spark/pull/19525
[SPARK-22289] [ML] Add JSON support for Matrix parameters (LR with coefficients bound) ## What changes were proposed in this pull request? jira: https://issues.apache.org/jira/browse/SPARK-22289 add JSON encode/decode for Param[Matrix]. The issue was reported by Nic Eggert during saving LR model with LowerBoundsOnCoefficients. There're two ways to resolve this as I see: 1. Support save/load on LogisticRegressionParams, and also adjust the save/load in LogisticRegression and LogisticRegressionModel. 2. Directly support Matrix in Param.jsonEncode, similar to what we have done for Vector. After some discussion in jira, we prefer the fix to support Matrix as a valid Param type, for simplicity and convenience for other classes. ## How was this patch tested? new unit test to cover the LR case and JsonMatrixConverter You can merge this pull request into a Git repository by running: $ git pull https://github.com/hhbyyh/spark lrsave Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/19525.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 #19525 ---- commit 92f599d3fb7159cfc1694d2c65321dd2abdc4ccc Author: Yuhao Yang <yuhao.y...@intel.com> Date: 2017-10-18T06:49:01Z add json for Matrix ---- --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org