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

Make k-mean runs two/three times faster with dense/sparse sample

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Implemented
    • None
    • 1.2.0
    • MLlib
    • None

    Description

      Note that the usage of `breezeSquaredDistance` in `org.apache.spark.mllib.util.MLUtils.fastSquaredDistance` is in the critical path, and breezeSquaredDistance is slow. We should replace it with our own implementation.

      Here is the benchmark against mnist8m dataset.

      Before
      DenseVector: 70.04secs
      SparseVector: 59.05secs

      With this PR
      DenseVector: 30.58secs
      SparseVector: 21.14secs

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            dbtsai DB Tsai
            dbtsai DB Tsai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment