Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/7095#discussion_r33993877
--- Diff: mllib/src/main/scala/org/apache/spark/ml/tree/treeModels.scala ---
@@ -70,6 +71,10 @@ private[ml] trait TreeEnsembleModel {
/** Weights for each tree, zippable with [[trees]] */
def treeWeights: Array[Double]
+ /** Weights used by the python wrappers. */
+ // Note: An array cannot be returned directly due to serialization
problems.
+ def javaTreeWeights: Vector = Vectors.dense(treeWeights)
--- End diff --
Make it package private. Java users do not really need it.
---
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]