部署#
部署到生产环境时,通常希望包含尽可能少的依赖项。对于这种情况,我们提供了 interpret-core
包,它仅包含 EBM 拟合、预测、编辑、序列化和生成解释所需的依赖项。
interpret
包包含 interpret-core
的所有依赖项,以及用于可视化 EBM、生成其他 glassbox 模型和 blackbox 解释所需的额外依赖项。
为了进一步定制,我们支持在 pip 安装时使用额外标签来微调依赖项。
安装所有依赖项(默认)
包 interpret
会安装运行包中任何部分所需的所有依赖项。
pip install interpret
conda install -c conda-forge interpret
git clone interpretml/interpret.git && cd interpret/scripts && make install
安装最小依赖项
如果您只需要必需的依赖项,或者希望定制依赖项,请安装 interpret-core
包。
pip install interpret-core
conda install -c conda-forge interpret-core
git clone interpretml/interpret.git && cd interpret/scripts && make install-core
安装部分官方依赖项 (pip)
并非所有支持的包管理器都涵盖此场景。如果您使用 pip
进行安装,可以利用 interpret-core
暴露的额外标签。
安装所有额外标签等同于安装 interpret
包,可以通过以下方式完成:
pip install interpret-core[debug,notebook,plotly,lime,sensitivity,shap,linear,skoperules,treeinterpreter,aplr,dash,testing]