Has anyone an idea how to retrieve from the probability column the first value "0" (which indicates the probability of that prediction being correct)
After running dataframe.schema (or dataframe.printSchema()) I got the following result for the probability column:
StructField('probability', VectorUDT(), True)
Below I am attaching part of the image of the dataframe.
I tried to expand the column probability with col("probability.*")
but it gave me an error:
Can only star expand struct data types. Attribute: `ArrayBuffer(probability)`.
I also tried to expand by just calling "probability.vectorType", for example! but I got the following error:
[INVALID_EXTRACT_BASE_FIELD_TYPE] Cannot extract a value from "probability". Need a complex type [STRUCT, ARRAY, MAP] but got "STRUCT, values: ARRAY>".