Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-2163

Set ``setConvergenceTol'' with a parameter of type Double instead of Int

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Implemented
    • 1.0.0
    • 1.0.1, 1.1.0
    • MLlib
    • None

    Description

      The class LBFGS in mllib.optimization currently provides a setConvergenceTol(tolerance: Int) method for setting the convergence tolerance. The tolerance parameter is of type Int. The specified tolerance is then used as parameter in calling LBFGS.runLBFGS, where the parameter convergenceTol is of type Double.

      The Int parameter may cause problem when one creates an optimizer and sets a Double-valued tolerance. e.g:

      override val optimizer = new LBFGS(gradient, updater)
            .setNumCorrections(9)
            .setConvergenceTol(1e-4)  // *type mismatch here*
            .setMaxNumIterations(100)
            .setRegParam(1.0)
      

      IMHO there is no need to make the tolerance of type Int. Let's change it into a Double parameter and eliminate the type mismatch problem.

      Attachments

        Activity

          People

            Unassigned Unassigned
            baigang Gang Bai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: