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

Add dtype="float32" support to vector_to_array UDF

    XMLWordPrintableJSON

Details

    • Story
    • Status: Resolved
    • Major
    • Resolution: Done
    • 3.0.0
    • 3.0.0, 3.1.0
    • MLlib, PySpark
    • None

    Description

      Previous PR: https://github.com/apache/spark/blob/master/python/pyspark/ml/functions.py

      In the previous PR, we introduced a UDF to convert a column of MLlib Vecters to a column of lists in python (Seq in scala). Currently, all the floating numbers in a vector is converted to Double in scala. In this issue, we will add a parameter in the python function vector_to_array(col) that allows converting to Float (32bits) in scala, which would be mapped to a numpy array of dtype=float32.

       

      Attachments

        Issue Links

          Activity

            People

              liangz Liang Zhang
              liangz Liang Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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