Github user BryanCutler commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20124#discussion_r159763813
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/tuning/ParamGridBuilder.scala ---
    @@ -118,3 +118,63 @@ class ParamGridBuilder @Since("1.2.0") {
         paramMaps
       }
     }
    +
    +
    +object ParamGridBuilder {
    +
    +  /**
    +   * Split the given list of paramMaps in two such that the left list 
contains the supplied
    +   * params and the right list does not.
    +   *
    +   * @param paramMaps Array of paramMaps to split
    +   * @param params Array of params that will be in the left list
    +   * @return Tuple of two Array[ParamMap]
    +   */
    +  def splitOnParams(paramMaps: Array[ParamMap],
    +                    params: Array[Param[_]]): (Array[ParamMap], 
Array[ParamMap]) = {
    +    val leftValues = mutable.Map.empty[Param[_], 
mutable.LinkedHashSet[Any]]
    --- End diff --
    
    This could be done more efficiently, I just went with a simple routine that 
I knew would generate the correct output.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to