【问题标题】:Python Svmlight Error: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the futurePython Svmlight Error: DeprecationWarning: using a non-integer number instead of an integer will result in the error in the future
【发布时间】:2013-09-30 10:43:42
【问题描述】:

我在我的 Mac OSX Mountain Lion 上运行带有 scikit_learn-0.14 的 python 2.7.5。

然而,我每次运行 svmlight 命令时都会收到以下警告:

DeprecationWarning:使用非整数而不是整数将导致错误>将来

【问题讨论】:

标签: python-2.7 scipy svmlight


【解决方案1】:

正如here 的回答,这是由 scikit-learn 中的非整数索引引起的 Numpy 1.8.0 弃用警告。不会影响结果。

【讨论】:

【解决方案2】:

当我将数字分配给矩阵时,我也遇到了这个问题。 像这样: Qmatrix[list2[0], list2[j]] = 1

组件可能是非整数,所以我改成这样: Qmatrix[int(list2[0]), int(list2[j])] = 1

警告已删除

【讨论】:

    猜你喜欢
    • 2022-12-19
    • 2022-12-01
    • 2023-02-09
    • 2021-01-13
    • 1970-01-01
    • 2018-11-16
    • 1970-01-01
    • 1970-01-01
    • 2022-12-02
    相关资源
    最近更新 更多