小编Abh*_*pta的帖子

如何在投票分类器 (Sklearn) 中调整权重

我正在尝试执行以下操作:

vc = VotingClassifier(estimators=[('gbc',GradientBoostingClassifier()),
                       ('rf',RandomForestClassifier()),('svc',SVC(probability=True))],
                       voting='soft',n_jobs=-1)

params = {'weights':[[1,2,3],[2,1,3],[3,2,1]]}
grid_Search = GridSearchCV(param_grid = params, estimator=vc)
grid_Search.fit(X_new,y)
print(grid_Search.best_Score_)
Run Code Online (Sandbox Code Playgroud)

在此,我想调整参数weights。如果我使用GridSearchCV,它会花费很多时间。因为它需要为每次迭代拟合模型。我猜这不是必需的。最好使用类似于prefitSelectModelFrom函数中使用的东西from sklearn.model_selection

还有其他选择还是我误解了什么?

prediction scikit-learn ensemble-learning

5
推荐指数
1
解决办法
3972
查看次数

curl :: curl_fetch_memory(url,handle = handle)中的错误:无法连接到R中的服务器:oauth2.0_token())

> github_token <- oauth2.0_token(oauth_endpoints("github"), myapp)

Waiting for authentication in browser...
      Press Esc/Ctrl + C to abort
      Authentication complete.
Error in curl::curl_fetch_memory(url, handle = handle) : 
      Couldn't connect to server
Run Code Online (Sandbox Code Playgroud)

我正在尝试从GitAPI获取数据。我需要使用此数据来查找创建回购的时间。我尝试安装“ httpuv”,但错误是相同的。

PS。我在代理服务器后面。

curl r

2
推荐指数
1
解决办法
1万
查看次数

处理POST方法请求Http4s的情况的正确方法

我有一个通过网络发送的 Post 请求,以获取与我使用 Http4s 的用户相关的数据。

在编写 HttpRoutes 时,我使用它来处理 POST 的情况,如下所示:

case req @ POST -> Root/ "posts" { "name": username, "friends": friends} =>
Run Code Online (Sandbox Code Playgroud)

thename和 thefriends是在请求​​正文中作为参数传递的属性。

然而,我似乎可以识别出一些语法错误'=>' expected but '{' found

post scala http http4s

2
推荐指数
1
解决办法
1236
查看次数

标签 统计

curl ×1

ensemble-learning ×1

http ×1

http4s ×1

post ×1

prediction ×1

r ×1

scala ×1

scikit-learn ×1