-
StandardScalerDE/spark 2022. 10. 31. 15:27
official documentation : https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.ml.feature.StandardScaler.html
- with mean = False 가 default라 만약 mean도 표준화 시켜주려면 True로 설정해야함.
- with std = True라 표준편차를 1로 맞춰줌
- numpy , sklearn과 값이 조금 차이가 있다는데 spark는 sample variance 사용하여 unbiased. numpy에서 그냥 쓰면 population std 사용하게 됨. https://stackoverflow.com/questions/51753088/standardscaler-in-spark-not-working-as-expected
'DE > spark' 카테고리의 다른 글
spark conf : 스키마 대문자도 허용하는 법 (0) 2023.05.12 clustering (0) 2022.10.31 libSVM format (0) 2022.10.31 cache vs persist (0) 2022.10.31 dataframe 보기 (0) 2022.10.27