Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use enum instead of int #8

Open
benmccann opened this issue May 10, 2016 · 0 comments
Open

Use enum instead of int #8

benmccann opened this issue May 10, 2016 · 0 comments

Comments

@benmccann
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant