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

    https://github.com/apache/spark/pull/8830#discussion_r40292192
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/feature/VectorAssembler.scala ---
    @@ -47,6 +48,28 @@ class VectorAssembler(override val uid: String)
       /** @group setParam */
       def setOutputCol(value: String): this.type = set(outputCol, value)
     
    +  /**
    +   * By default, the attribute names of vector components will be 
`groupName + '_' + attrName`.
    +   * This parameter allows the overriding of the group prefix per input 
column vector.
    +   *
    +   * @group param Mapping of input vector names to group prefixes. If not 
specified, the group
    +   *              prefix for an input vector column will default to 
`groupName + '_'`.
    +   * @param groupPrefixes
    +   */
    +  final val groupPrefixes: Param[Map[String, String]] = new Param(
    --- End diff --
    
    This would be a really advanced parameter for users. For this PR, is it 
possible to use existing attribute name generation in `VectorAssembler` and 
rename the generated attributes after? We could assign a unique prefix to new 
columns and then remove this prefix from all attribute names.
    
    Otherwise, there are couple issues with this parameter:
    1. It is not Java/Python friendly.
    2. It is quite hard to understand.
    I don't think those issues should be addressed in this PR.


---
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]

Reply via email to