7
나는 ML Pipeline
를 만들려고 다음과 같은 오류를 받고 있어요 :PyFark DataFrame에서 ArrayType을 DenseVector로 변환하는 방법은 무엇입니까?
pyspark.sql.utils.IllegalArgumentException: 'requirement failed: Column features must be of type [email protected] but was actually ArrayType(DoubleType,true).'
내 features
열은 부동 소수점 값의 배열을 포함하고 있습니다. 어떤 종류의 벡터로 변환해야 할 필요가있는 것 같습니다 (DenseVector는 그렇게 희소하지 않습니다). DataFrame에서 직접이 작업을 수행 할 수있는 방법이 있습니까? 아니면 RDD로 변환해야합니까?