Data Analysis and ML, DL/스파크
[Pyspark] Trouble Shooting
junha6316
2020. 11. 17. 16:15
1. Py4JNetworkError: An error occurred while trying to connect to the Java server (127.0.0.1:46831)
메모리 부족으로 발생한 문제로 그냥 커널을 껐다가 키자.. 추가할 수 있는 메모리가 있으면 메모리를 추가하는 것도 좋은 방법
https://stackoverrun.com/ko/q/11300059
2. SparkWithDataFrame: java.lang.IllegalArgumentException: requirement failed
StandardScaler를 사용할 때 발생한 문제
StandardScaling을 하기전에 아래와 같이 VectorAssemble을 해줘야한다.
vecAs = [VectorAssembler(inputCols=[c], outputCol=c+'vec') for c in cols]
stdSclr = [StandardScaler(inputCol = c +'vec', outputCol= c + 'scld') for c in cols]