Я новичок в писпарке.
Я хочу посчитать соотношение между column(int)
с другим column(vector from onehotencoder)
.
Я использую этот код:
import six
for i in df.columns:
if not(isinstance(df.select(i).take(1)[0][0], six.string_types)):
print( "Correlation to label for", i, df.stat.corr('label',i))
Я получил эту ошибку при подсчете корреляции между меткой в столбце onehotencoder:
Py4JJavaError: An error occurred while calling o9219.corr. :
java.lang.IllegalArgumentException:
requirement failed:
Currently correlation calculation for columns with dataType org.apache.spark.ml.linalg.VectorUDT@3bfc3ba7 not supported