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

GLM toString should not output full weight vector

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.3.0
    • 1.4.0
    • MLlib
    • None

    Description

      GeneralizedLinearModel.toString prints (weights, intercept)

        override def toString() = "(weights=%s, intercept=%s)".format(weights, intercept)
      

      This has downsides for large models:

      • The output gets truncated, so you cannot see the intercept.
      • The long list of weights is not very useful.

      Proposal: Follow the example of DecisionTreeModel, where toString prints a small summary, and toDebugString prints the full model. The summary could have:

      • intercept
      • numFeatures
      • (maybe other stats)

      Attachments

        Activity

          People

            yanboliang Yanbo Liang
            josephkb Joseph K. Bradley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: