安装#
Featuretools 支持 Python 3.9 - 3.12。可以从 pypi、conda-forge 或从 源码 安装。
要安装 Featuretools,请运行以下命令
$ python -m pip install featuretools
$ conda install -c conda-forge featuretools
附加组件#
Featuretools 允许用户单独或一次性安装附加组件
$ python -m pip install "featuretools[complete]"
$ python -m pip install "featuretools[dask]"
$ python -m pip install "featuretools[nlp]"
$ python -m pip install "featuretools[premium]"
$ conda install -c conda-forge nlp-primitives dask distributed
$ conda install -c conda-forge nlp-primitives
$ conda install -c conda-forge dask distributed
NLP Primitives: 在 Featuretools 中使用自然语言处理原语
Premium Primitives: 在 Featuretools 中使用 Premium Primitives 的原语
Dask: 用于通过
n_jobs
并行运行calculate_feature_matrix
安装 Graphviz#
为了使用 EntitySet.plot
或 featuretools.graph_feature
,您需要安装 graphviz 库。
$ brew install graphviz
$ python -m pip install graphviz
$ brew install graphviz
$ conda install -c conda-forge python-graphviz
$ sudo apt install graphviz
$ python -m pip install graphviz
$ sudo apt install graphviz
$ conda install -c conda-forge python-graphviz
$ python -m pip install graphviz
$ conda install -c conda-forge python-graphviz
如果您使用 pip
为 Windows 安装了 graphviz,请从官方来源安装 graphviz.exe。
源码#
要从源码安装 Featuretools,请从 GitHub 克隆仓库,并安装依赖项。
git clone https://github.com/alteryx/featuretools.git
cd featuretools
python -m pip install .
Docker#
也可以在 Docker 容器中运行 Featuretools。您可以通过在容器中将其作为包安装(按照常规安装指南)或使用 Dockerfile
中的以下命令创建一个预装 Featuretools 的新镜像来完成。
FROM --platform=linux/x86_64 python:3.9-slim-buster
RUN apt update && apt -y update
RUN apt install -y build-essential
RUN pip3 install --upgrade --quiet pip
RUN pip3 install featuretools
开发#
要为代码库做出贡献,请遵循此处的指南。