小编ive*_*ion的帖子

如何惩罚假阴性而不是误报

从业务角度来看,假阴性导致成本(真实货币)比假阳性高出约10倍.鉴于我的标准二进制分类模型(logit,随机森林等),我如何将其合并到我的模型中?

我是否必须改变(加权)损失函数以支持"首选"错误(FP)?如果是这样,怎么办?

python machine-learning scikit-learn

9
推荐指数
2
解决办法
4507
查看次数

如何使用 Seaborn 绘制阶跃函数?

我想使用类似于这个matplotlib 示例的Seaborn 制作一个阶梯图

import seaborn as sns
x = [1,2,3,4]
y = [0.002871, 0.0051, 0.0086, 0.005]
sns.lineplot(x,y)
Run Code Online (Sandbox Code Playgroud)

我可以使用drawstyle='steps-post'吗?

以下不起作用: sns.lineplot(x,y, drawstyle='steps-pre')

结果应如下所示: 阶梯图

python seaborn

3
推荐指数
1
解决办法
4394
查看次数

gensim保存负载模型弃用警告

保存/加载gensim词嵌入时,我收到以下弃用警告:

model.save("mymodel.model")

/home/.../lib/python3.7/site-packages/smart_open/smart_open_lib.py:398: 
UserWarning: This function is deprecated, use smart_open.open instead. 
See the migration notes for details:
Run Code Online (Sandbox Code Playgroud)

https://github.com/RaRe-Technologies/smart_open/blob/master/README.rst#migrating-to-the-new-open-function

  'See the migration notes for details: %s' % _MIGRATION_NOTES_URL
Run Code Online (Sandbox Code Playgroud)

根据页面上的说明,我不知道该怎么办。那么,我该如何保存并打开我的模型呢?

我使用python 3.7,gensim 3.7.3。和smart_open 1.8.4。我认为使用gensim 3.7.1时没有得到警告。和python 3.5。smart_open应该是1.8.4。

gensim

3
推荐指数
1
解决办法
1421
查看次数

标签 统计

python ×2

gensim ×1

machine-learning ×1

scikit-learn ×1

seaborn ×1