diff options
Diffstat (limited to 'mllib')
-rw-r--r-- | mllib/pom.xml | 2 | ||||
-rw-r--r-- | mllib/src/main/scala/org/apache/spark/ml/param/params.scala | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/mllib/pom.xml b/mllib/pom.xml index a0bda89cca..7b7beaf59d 100644 --- a/mllib/pom.xml +++ b/mllib/pom.xml @@ -125,6 +125,8 @@ <directory>../python</directory> <includes> <include>pyspark/mllib/*.py</include> + <include>pyspark/ml/*.py</include> + <include>pyspark/ml/param/*.py</include> </includes> </resource> </resources> diff --git a/mllib/src/main/scala/org/apache/spark/ml/param/params.scala b/mllib/src/main/scala/org/apache/spark/ml/param/params.scala index 04f9cfb1bf..5fb4379e23 100644 --- a/mllib/src/main/scala/org/apache/spark/ml/param/params.scala +++ b/mllib/src/main/scala/org/apache/spark/ml/param/params.scala @@ -165,6 +165,13 @@ trait Params extends Identifiable with Serializable { } /** + * Sets a parameter (by name) in the embedded param map. + */ + private[ml] def set(param: String, value: Any): this.type = { + set(getParam(param), value) + } + + /** * Gets the value of a parameter in the embedded param map. */ private[ml] def get[T](param: Param[T]): T = { @@ -286,7 +293,6 @@ class ParamMap private[ml] (private val map: mutable.Map[Param[Any], Any]) exten new ParamMap(this.map ++ other.map) } - /** * Adds all parameters from the input param map into this param map. */ |