olbapjose / pyspark-approx-smote

Pyspark wrapper of the scala (Spark) version of Approx SMOTE
Other
2 stars 0 forks source link

TypeError occured when running the example code #10

Open qy201706 opened 6 months ago

qy201706 commented 6 months ago

I appreciate your meaningful work which can help me apply SMOTE in the Pyspark framework. Unfortunately, I got some errors when running the example code. Could you please help me fix it? Thank you very much.

The whole Traceback is following:

Traceback (most recent call last): File "/home/up2242285/Mini_Project/Spark_hdfs_RF.py", line 67, in seed=1234 File "/home/anaconda3/lib/python3.6/site-packages/pyspark/python/lib/pyspark.zip/pyspark/init.py", line 110, in wrapper File "/home/up2242285/Mini_Project/pyspark-approx-smote/pyspark_approx_smote/asmote.py", line 89, in init self._java_obj = self._new_java_obj("org.apache.spark.ml.instance.ASMOTE", self.uid) File "/home/anaconda3/lib/python3.6/site-packages/pyspark/python/lib/pyspark.zip/pyspark/ml/wrapper.py", line 67, in _new_java_obj TypeError: 'JavaPackage' object is not callable

qy201706 commented 6 months ago

The env is:

image
olbapjose commented 6 months ago

@qy201706 Hi, thanks for your commet. Actually I did not develop this code but just forked another repository which I cannot find right now. Just to check, have you included the JAVA dependency? Remember this is just a wrapper thar requires to include the true parallel implementation developed in Java in https://github.com/mjuez/approx-smote