Class functions

Object
org.apache.spark.ml.functions

public class functions extends Object
  • Constructor Details

    • functions

      public functions()
  • Method Details

    • vector_to_array

      public static Column vector_to_array(Column v, String dtype)
      Converts a column of MLlib sparse/dense vectors into a column of dense arrays.
      Parameters:
      v - : the column of MLlib sparse/dense vectors
      dtype - : the desired underlying data type in the returned array
      Returns:
      an array<float> if dtype is float32, or array<double> if dtype is float64
      Since:
      3.0.0
    • array_to_vector

      public static Column array_to_vector(Column v)
      Converts a column of array of numeric type into a column of dense vectors in MLlib.
      Parameters:
      v - : the column of array<NumericType&gt type
      Returns:
      a column of type org.apache.spark.ml.linalg.Vector
      Since:
      3.1.0