Hi Feynman,

Thank you for suggestion. How can I ensure that there will be no problems for 
Java users? (I only use Scala API)

Best regards, Alexander

From: Feynman Liang [mailto:[email protected]]
Sent: Monday, September 14, 2015 5:27 PM
To: Ulanov, Alexander
Cc: [email protected]
Subject: Re: Enum parameter in ML

Since PipelineStages are serializable, the params must also be serializable. We 
also have to keep the Java API in mind. Introducing a new enum Param type may 
work, but we will have to ensure that Java users can use it without dealing 
with ClassTags (I believe Scala will create new types for each possible value 
in the Enum) and that it can be serialized.

On Mon, Sep 14, 2015 at 4:31 PM, Ulanov, Alexander 
<[email protected]<mailto:[email protected]>> wrote:
Dear Spark developers,

I am currently implementing the Estimator in ML that has a parameter that can 
take several different values that are mutually exclusive. The most appropriate 
type seems to be Scala Enum 
(http://www.scala-lang.org/api/current/index.html#scala.Enumeration). However, 
the current ML API has the following parameter types:
BooleanParam, DoubleArrayParam, DoubleParam, FloatParam, IntArrayParam, 
IntParam, LongParam, StringArrayParam

Should I introduce a new parameter type in ML API that is based on Scala Enum?

Best regards, Alexander

Reply via email to