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

    https://github.com/apache/spark/pull/1624#discussion_r15566654
  
    --- 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 --
    
    I used a type of Enumeration in order to separate between the different 
types of Update Methods [Regularizers] with which the user wants to create the 
model from training data. I tried to extend this object from Enumeration but 
from what I have seen it uses reflection heavily and it does not work well with 
serialized objects and with py4j...


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