Struktur proyek logis, standar yang cukup standar tetapi fleksibel untuk melakukan dan berbagi pekerjaan ilmu data.
Cookiecutter Data Science (CCDS) adalah alat untuk menyiapkan templat proyek ilmu data yang menggabungkan praktik terbaik. Untuk mempelajari lebih lanjut tentang filosofi CCDS, kunjungi beranda proyek.
Cookiecutter Data Science V2 telah berubah dari V1. Sekarang membutuhkan pemasangan paket python cookiecutter-science baru, yang memperluas fungsionalitas utilitas templating cookiecutter. Gunakan program baris perintah
ccdsyang disediakan alih-alihcookiecutter.
Cookiecutter Data Science V2 membutuhkan Python 3.8+. Karena ini adalah aplikasi utilitas lintas proyek, kami sarankan untuk menginstalnya dengan PIPX. Opsi Perintah Instalasi:
# With pipx from PyPI (recommended)
pipx install cookiecutter-data-science
# With pip from PyPI
pip install cookiecutter-data-science
# With conda from conda-forge (coming soon)
# conda install cookiecutter-data-science -c conda-forge Untuk memulai proyek baru, jalankan:
ccdsStruktur direktori proyek baru Anda akan terlihat seperti ini (tergantung pada pengaturan yang Anda pilih):
├── LICENSE <- Open-source license if one is chosen
├── Makefile <- Makefile with convenience commands like `make data` or `make train`
├── README.md <- The top-level README for developers using this project.
├── data
│ ├── external <- Data from third party sources.
│ ├── interim <- Intermediate data that has been transformed.
│ ├── processed <- The final, canonical data sets for modeling.
│ └── raw <- The original, immutable data dump.
│
├── docs <- A default mkdocs project; see www.mkdocs.org for details
│
├── models <- Trained and serialized models, model predictions, or model summaries
│
├── notebooks <- Jupyter notebooks. Naming convention is a number (for ordering),
│ the creator's initials, and a short `-` delimited description, e.g.
│ `1.0-jqp-initial-data-exploration`.
│
├── pyproject.toml <- Project configuration file with package metadata for
│ {{ cookiecutter.module_name }} and configuration for tools like black
│
├── references <- Data dictionaries, manuals, and all other explanatory materials.
│
├── reports <- Generated analysis as HTML, PDF, LaTeX, etc.
│ └── figures <- Generated graphics and figures to be used in reporting
│
├── requirements.txt <- The requirements file for reproducing the analysis environment, e.g.
│ generated with `pip freeze > requirements.txt`
│
├── setup.cfg <- Configuration file for flake8
│
└── {{ cookiecutter.module_name }} <- Source code for use in this project.
│
├── __init__.py <- Makes {{ cookiecutter.module_name }} a Python module
│
├── config.py <- Store useful variables and configuration
│
├── dataset.py <- Scripts to download or generate data
│
├── features.py <- Code to create features for modeling
│
├── modeling
│ ├── __init__.py
│ ├── predict.py <- Code to run model inference with trained models
│ └── train.py <- Code to train models
│
└── plots.py <- Code to create visualizations
Jika Anda ingin menggunakan template proyek V1 lama, Anda harus memiliki paket cookiecutter-data-science atau paket cookiecutter yang diinstal. Kemudian, gunakan program baris perintah dengan opsi -c v1 :
ccds https://github.com/drivendataorg/cookiecutter-data-science -c v1
# or equivalently
cookiecutter https://github.com/drivendataorg/cookiecutter-data-science -c v1Kami menyambut kontribusi! Lihat Dokumen untuk Pedoman.
pip install -r dev-requirements.txtpytest tests