While training MultilayerPerceptronClassifier in Pyspark (version 2.4.5), I am getting the following exception:
requirement failed: OneHotEncoderModel expected x categorical values for input column label, but the input column had metadata specifying n values.
But the code is working fine with RandomForestClassifier, DecisionTreeClassifier, GBTClassifier, and LinearSVC for the same dataset.