How to create a dataframe with two columns, namely p_vals and t_vals, containing values obtained from GeneralizedLinearRegression, that is summary.tValues() and summary.pValues(). Both of those values are of double[] type. My question is how can I convert summary.tValues() and summary.pValues() to column types so the dataframe can be created. I am trying to do this in Java.
I have tried the following, which didn't work due to the argument type mismatch.
df = df.withColumn("T Values", summary.tValues())
.withColumn("P Values", summary.pValues());