我在 Azure Databricks 上使用了 geoscan 库。但是,当我配置任务时,出现此错误。
`TypeError: 'JavaPackage' object is not callable
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<command-615568507565679> in <module>
----> 1 gs = Geoscan() \
2 .setLatitudeCol("latitude") \
3 .setLongitudeCol("longitude") \
4 .setPredictionCol("cluster") \
5 .setEpsilon(400) \
/databricks/spark/python/pyspark/__init__.py in wrapper(self, *args, **kwargs)
112 raise TypeError("Method %s forces keyword arguments." % func.__name__)
113 self._input_kwargs = kwargs
--> 114 return func(self, **kwargs)
115 return wrapper
116
/databricks/python/lib/python3.8/site-packages/geoscan/geoscan.py in __init__(self, epsilon, minPts, predictionCol, latitudeCol, longitudeCol)
116
117 super(Geoscan, self).__init__()
--> 118 self._java_obj = self._new_java_obj(Geoscan._classpath, self.uid)
119 kwargs = self._input_kwargs
120 self.setParams(**kwargs)
/databricks/spark/python/pyspark/ml/wrapper.py in _new_java_obj(java_class, *args)
64 java_obj = getattr(java_obj, name)
65 java_args = [_py2java(sc, arg) for arg in args]
---> 66 return java_obj(*java_args)
67
68 @staticmethod
TypeError: 'JavaPackage' object is not callable`
我已经按照其他也遇到我的问题的人的建议进行了尝试,但它还没有起作用。我想要这个问题的完整解决方案。