python - 属性错误: 'module' object has no attribute 'SMAC_optimizer'

标签 python python-2.7 machine-learning

我尝试运行pySMAC来查找Python函数的输入参数,从而最小化返回值。 我按照 Quickstart Guide 中的示例进行操作,但它引发了异常:

属性错误:“模块”对象没有属性“SMAC_optimizer”

导入部分包括:导入 pysmac

异常符合:

opt = pysmac.SMAC_optimizer()

为什么会引发此异常?我该如何解决它?

我已经在 github 上询问过开发人员,但他们还没有给出任何答复。 我也在 StackOverflow 上读过类似的问题,但没有解决方案。

最佳答案

我克隆了存储库 https://github.com/automl/pysmac.git并运行python setup.py install

这有帮助,SMAC 之后就可以工作了。

注意: 使用 pip install pysmac 通过 pip 安装 pysmac 导致了错误。

这也没有帮助: pip install git+https://github.com/automl/pysmac.git

关于python - 属性错误: 'module' object has no attribute 'SMAC_optimizer' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45845182/

相关文章:

python-2.7 - 使用opencv+python计算汽车

python - 如何使用参数上的自定义标记在 pytest 中选择测试子集

linux - 使用 Pip 安装 Twilio 时遇到问题

machine-learning - 用于音乐的 LSTM 自动编码器 - Keras [序列到序列]

python - MNIST 数据集的 Keras 准确度没有变化

python - 当第一列为空时,Pandas 读取具有多个标题的 Excel 工作表

python - Librosa 从 URL 读取 MP3 音频

python - 如何在Python中查找特定条件的出现频率

python - 如何限制django rest框架中的 Action

machine-learning - 我可以使用 scikit-learn 管道仅转换特定变量吗?