Skip to content

Use enum instead of int #8

@benmccann

Description

@benmccann

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions