Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'JavaPackage' object is not callable #35

Closed
nesrineZibani opened this issue Mar 29, 2018 · 1 comment
Closed

TypeError: 'JavaPackage' object is not callable #35

nesrineZibani opened this issue Mar 29, 2018 · 1 comment

Comments

@nesrineZibani
Copy link

when I try to run the test I get this error :

TypeError Traceback (most recent call last)
in ()
3
4
----> 5 knn = KNNClassifier(k=1, topTreeSize=1, topTreeLeafSize=1, subTreeLeafSize=1, bufferSizeSampleSize=[1, 2, 3]) # bufferSize=-1.0,
6 model = knn.fit(training_data)
7

C:\spark-2.2.1-bin-hadoop2.7\python\pyspark_init_.pyc in wrapper(self, *args, **kwargs)
102 raise TypeError("Method %s forces keyword arguments." % func.name)
103 self._input_kwargs = kwargs
--> 104 return func(self, **kwargs)
105 return wrapper
106

C:\spark-2.2.1-bin-hadoop2.7\python\pyspark\ml\knn.py in init(self, featuresCol, labelCol, predictionCol, seed, topTreeSize, topTreeLeafSize, subTreeLeafSize, bufferSize, bufferSizeSampleSize, balanceThreshold, k, neighborsCol, maxNeighbors, rawPredictionCol, probabilityCol)
17 super(KNNClassifier, self).init()
18 self._java_obj = self._new_java_obj(
---> 19 "org.apache.spark.ml.knn.KNNClassifier", self.uid)
20
21 self.topTreeSize = Param(self, "topTreeSize", "number of points to sample for top-level tree")

C:\spark-2.2.1-bin-hadoop2.7\python\pyspark\ml\wrapper.pyc in _new_java_obj(java_class, *args)
61 java_obj = getattr(java_obj, name)
62 java_args = [_py2java(sc, arg) for arg in args]
---> 63 return java_obj(*java_args)
64
65 @staticmethod

TypeError: 'JavaPackage' object is not callable

@kaushikacharya
Copy link
Contributor

kaushikacharya commented Mar 29, 2018 via email

@saurfang saurfang closed this as completed Oct 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants