spark-sklearn TypeError: 'JavaPackage' object is not callable
from sklearn import svm, datasets
from spark_sklearn import GridSearchCV
from pyspark import SparkContext, SparkConf
iris = datasets.load_iris()
parameters = {'kernel':('linear', 'rbf'), 'C':[1, 10]}
svr = svm.SVC(gamma='auto')
conf = SparkConf().setAppName('pysk').setMaster('local')
sc = SparkContext(conf=conf)
clf = GridSearchCV(sc, svr, parameters)
clf.fit(iris.data, iris.target)
spark-sklearn在sc = SparkContext(conf=conf)处报错'JavaPackage' object is not callable,经检查是pyspark版本过高导致。
spark-sklearn TypeError: 'JavaPackage' object is not callable的更多相关文章
- java/javac命令行如何同时引用多个包;错误 TypeError: 'JavaPackage' object is not callable 的含义
出现这类错误提示:'JavaPackage' object is not callable,可以看下所引用的jar包或者class文件是否在java的路径搜索范围内 命令行模式下:javac可以编译* ...
- python Flask :TypeError: 'dict' object is not callable
flask 基于Werkzeug .. @moudule.route('/upload', methods=['GET', 'POST']) def upload_file(): global _fl ...
- TypeError: 'module' object is not callable cp fromhttp://blog.csdn.net/huang9012/article/details/17417133
程序代码 class Person: #constructor def __init__(self,name,sex): self.Name = name ...
- TypeError: 'QueryDict' object is not callable
id = int(request.POST('id')) Error message: TypeError: 'QueryDict' object is not callable Error rese ...
- appium 提示报错“TypeError: 'unicode' object is not callable”的解决方式!
这里提到的这个报错,是小错误且容易经常会犯,有时需要特别注意使用. 目的要求结果:根据某个元素的id值获取到对应id的text值,并且将获取的text值与本身存在的text值做比较,查看text值是否 ...
- Python学习笔记1 -- TypeError: 'str' object is not callable
Traceback (most recent call last): File "myfirstpython.py", line 39, in <module> pri ...
- Python TypeError: 'module' object is not callable 原因分析
今天尝试使用pprint进行输出,语句为 >>>import pprint >>>pprint(people) 结果报错,TypeError: 'module' o ...
- python TypeError: 'int' object is not callable 问题解决
TypeError: 'int' object is not callable 这个错误的原因很简单 看下面的程序: def loss(a,b): return a-b loss = 0 loss = ...
- flask渲染模板时报错TypeError: 'UnboundField' object is not callable
渲染模板时,访问页面提示TypeError: 'UnboundField' object is not callable 检查代码,发现实例化表单类是,没有加括号:form = NewNoteForm ...
随机推荐
- tensorflow roadshow 全球巡回演讲 会议总结
非常荣幸有机会来到清华大学的李兆基楼,去参加 tensorflow的全球巡回.本次主要介绍tf2.0的新特性和新操作. 1. 首先,tensorflow的操作过程和机器学习的正常步骤一样,(speak ...
- 轻松理解JS中的面向对象,顺便搞懂prototype和__proto__
这篇文章主要讲一下JS中面向对象以及 __proto__,ptototype和construcator,这几个概念都是相关的,所以一起讲了. 在讲这个之前我们先来说说类,了解面向对象的朋友应该都知道, ...
- 1215 - Finding LCM
1215 - Finding LCM LCM is an abbreviation used for Least Common Multiple in Mathematics. We say LC ...
- tensorflow开发环境版本组合
记录下各模块的版本 tensorflow 1.15.0 print tf.__version__ cuda 10.0.130 nvcc -v cudnn 7.6.4 ...
- 你们见过java类型转换,自己转自己失败的情况吗?很神奇的操作
问题就是上面这个问题. List<SlaughterProductModelForm> slaughterProducts = slaughterForm.getSlaughterProd ...
- codewars--js--Write Number in Expanded Form—filters、map、reduce、forEach
问题描述: you will be given a number and you will need to return it as a string in Expanded Form. For ex ...
- java设计模式学习笔记——里氏替换原则
oo中的继承性的思考和说明 1.继承包含这样一层含义:父类中凡是已经实现好的方法,实际上是在设定规范和契约,虽然它不强制要求所有的子类必须遵循这些七月,但是如果子类对这些已经实现的方法任意修改,就会对 ...
- windows10家庭版的策略组
策略组是个好东西,可惜家庭版没有 但是,请看大佬博客https://blog.csdn.net/cangsheng45/article/details/82262037
- html文件如何下载文件
HTML中下载文件两种方法:a标签下载:js下载; <!-- 网页地址和图片地址同源的情况下这样是可以的,不同源则是直接打开这个地址 --> <!-- 方法一:同源情况下载 --&g ...
- 第一天,初学Markdown
Markdown学习 二级标题 三级标题 字体 hello,world hello,world hello,world hello,world 引用 飞冲 分割线 图片 超链接 跳转到安徽科技学院 列 ...