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

Fix the type error in the final example given in MLlib - Clustering documentation

    XMLWordPrintableJSON

Details

    Description

      The final example in MLlib - Clustering documentation has a code line that leads to a type error.

      The problematic line reads as:

      model.predictOnValues(testData).print()
      

      but it should be

      model.predictOnValues(testData.map(lp => (lp.label, lp.features))).print()
      

      Attachments

        Issue Links

          Activity

            People

              emres Emre Sevinç
              emres Emre Sevinç
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Remaining Estimate - 1h
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified