spark-libFM icon indicating copy to clipboard operation
spark-libFM copied to clipboard

Use enum instead of int

Open benmccann opened this issue 8 years ago • 0 comments

task is currently an int:

@param task 0 for Regression, and 1 for Binary Classification

Calling it looks like:

FMWithSGD.train(trainingData.rdd(), 1, numIterations);

Which is much less clear than something like:

FMWithSGD.train(trainingData.rdd(), REGRESSION, numIterations);

I would suggest using an enum instead of an int. This is exactly the type of case where enums are meant to be used.

benmccann avatar May 10 '16 20:05 benmccann