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

    https://github.com/apache/spark/pull/1624#discussion_r15566835
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/api/python/PythonMLLibAPI.scala ---
    @@ -42,6 +43,16 @@ class PythonMLLibAPI extends Serializable {
       private val DENSE_MATRIX_MAGIC: Byte = 3
       private val LABELED_POINT_MAGIC: Byte = 4
     
    +  /**
    +   * Enumeration used to define the type of Regularizer
    +   * used for linear methods.
    +   */
    +  object RegularizerType extends Serializable {
    +    val L2 : Int = 0
    +    val L1 : Int = 1
    +    val NONE : Int = 2
    +  }
    --- End diff --
    
    Using strings with a clear doc should be sufficient. Then you can map the 
string to `L1Updater` or `SquaredUpdater` inside `PythonMLLibAPI`.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to