项目 / nilmtk/nilmtk

nilmtk/nilmtk

行业推荐
语言 Python标签 disaggregationpythonnilmenergyforecastingalgorithmsipython-notebookenergy-disaggregationnilmtknilm-algorithms数据更新 2026-11-23 06:44:28 · 仓库 2026-11-22

一段话介绍

NILMTK 是非侵入式负荷监测(NILM)开源生态里的数据和评估层,用来转换和加载能源数据集,表示建筑与电表,准备时间窗口,计算统计与指标,并提供经典参考算法。源文写明:本仓库面向数据、电表、预处理或指标相关工作;维护中的神经网络模型或可复现基准结果应分别使用配套的 nilmtk-contrib 与 NILMbench。核心支持 Python 3.11 及以上,可用 uv 创建隔离环境后从 Git 安装。它不随仓库分发 REDD、UK-DALE、REFIT 等受许可约束的数据集,需从官方保管方下载并在本地转换。说明见[生态指南](https://nilmtk.github.io/)和[仓库 README](https://github.com/nilmtk/nilmtk)。

本站整理,非 GitHub 官方 description。

官方 description(GitHub API 原样)
Non-Intrusive Load Monitoring Toolkit (nilmtk)
963累计星
488Fork
—峰值日增
0上榜次数
总榜
暂未入榜
日榜
暂未入榜
周榜
暂未入榜
月榜
暂未入榜

官方快照(gh_history.db,2026-11-25):总榜 未进 Top50 · 日榜 未进 Top50 · 周榜未满 7 天基线(官方不生成) · 月榜暂无官方口径;下方四卡为站内趋势聚合(周卡按上榜次数,非官方 7 日增量窗)。

行业与场景

按行业选型 →

能耗监测与能效优化

适配系统:能源管理系统、能耗监测平台 · 得分 1.4

面向能耗采集与负荷分析建模,可用于园区/楼宇能效诊断与用能优化建议。

更多信息

以下三段按该项目自己的 GitHub README 章节摘录(可合理截断并标明);README 没有对应章节的留空,不编造。

我的用法
NILMTK 核心需 Python 3.11 及以上,官方推荐用 uv 创建隔离环境安装,并可用 nilmtk-convert 将 REDD 等数据集转换为 h5 文件。
特点或设计要点
核心提供公开能源数据集转换器,对建筑、电表、电器和时间范围的惰性访问,以及重采样、对齐、预处理与数据质量统计;另有标准 NILM 准确率与能耗指标、供 nilmtk-contrib 使用的快速实验 API,以及经典参考分解器与基线工具。命令行可用 `nilmtk-convert` 列出并转换数据集。API 参考见 [nilmtk.github.io/nilmtk/master](https://nilmtk.github.io/nilmtk/master/index.html)。源文写明核心库本身不发布单独的官方 Docker 镜像,通用环境应使用 nilmtk-contrib 的 Dockerfile。
星标走势还差一天的数据,明天就能看到曲线
每天 10:30 记一次星标,连续两天后自动生成曲线
首次发现 — · 最近在榜 2026-07-20 · 语言 Python · 贡献者 —
python

GitHub 项目主页介绍

来自 GitHub 仓库 README / 主页介绍正文,原样摘录,共 6,144 字节。

# NILMTK core

NILMTK is the data and evaluation layer of the open-source ecosystem for
non-intrusive load monitoring (NILM). It converts and loads energy datasets,
represents buildings and meters, prepares time windows, computes statistics and
metrics, and provides classical reference algorithms.

**Use this repository when your work is about data, meters, preprocessing, or
metrics.** For maintained neural models or reproducible benchmark claims, use
the companion repositories below.

## Ecosystem repositories

| Research task | Repository |
| --- | --- |
| Dataset conversion, meter access, preprocessing, and metrics | **[NILMTK core](https://github.com/nilmtk/nilmtk)** — this repository |
| Appliance taxonomy, synonyms, meter relationships, and dataset schema | [NILM Metadata](https://github.com/nilmtk/nilm_metadata) |
| Disaggregation model implementation and testing | [nilmtk-contrib](https://github.com/nilmtk/nilmtk-contrib) |
| Fixed T1/T2/T3 evaluation and published result bundles | [NILMbench](https://github.com/nilmtk/nilmbench) |

The [NILMTK ecosystem guide](https://nilmtk.github.io/) explains how these
layers fit together, which Docker route to use, and which papers to cite.

## Supported installation

NILMTK core supports Python 3.11 and newer. Use Python 3.11 for an end-to-end
environment shared with nilmtk-contrib and NILMbench.

Install [uv](https://docs.astral.sh/uv/getting-started/installation/), then create
an isolated environment:

```bash
uv venv --python 3.11
source .venv/bin/activate
uv pip install "nilmtk @ git+https://github.com/nilmtk/nilmtk.git"
python -c "import nilmtk; print(nilmtk.__version__)"
```

On Windows PowerShell, activate the environment with
`.venv\Scripts\Activate.ps1`.

To use the DEDDIAG converter, install the optional extra:

```bash
uv pip install "nilmtk[deddiag] @ git+https://github.com/nilmtk/nilmtk.git"
```

Do not combine these instructions with old Python 3.6, Anaconda-channel, or
`setup.py develop` tutorials. Those routes describe earlier releases and are
not the supported installation for the current repository.

### Verify the command-line converter

```bash
nilmtk-convert --help
nilmtk-convert list
# Example after downloading REDD:
nilmtk-convert redd /path/to/low_freq /path/to/redd.h5
```

Dataset-specific converter arguments and source links live under
[`nilmtk/dataset_converters`](nilmtk/dataset_converters).

## Docker ownership

NILMTK core is a Python library and does not publish a separate official core
image. This is intentional:

- use the single [nilmtk-contrib Dockerfile](https://github.com/nilmtk/nilmtk-contrib)
  for a general environment containing core, metadata, and model code;
- use [NILMbench](https://github.com/nilmtk/nilmbench) for pinned CPU-smoke and
  CUDA-benchmark runtimes that certify leaderboard results;
- do not create an image for each algorithm.

Keeping container ownership in those two places prevents four repositories from
shipping drifting copies of the same environment.

## Data

NILMTK does not redistribute REDD, UK-DALE, REFIT, or other licensed datasets.
Download data from its official custodian, comply with its license, and convert
it locally. A converted HDF5 dataset can then be opened with:

```python
from nilmtk import DataSet

dataset = DataSet("redd.h5")
print(dataset.metadata)
print(dataset.buildings)
```

NILM Metadata is installed with core and supplies the canonical appliance
taxonomy, synonyms, and meter relationships used while loading datasets.

## What core provides

- converters for public energy datasets;
- lazy access to buildings, meters, appliances, and time frames;
- resampling, alignment, preprocessing, and data-quality statistics;
- standard NILM accuracy and energy metrics;
- the rapid experimentation API used by nilmtk-contrib;
- classical reference disaggregators and baseline utilities.

Detailed API reference is published at
[nilmtk.github.io/nilmtk/master](https://nilmtk.github.io/nilmtk/master/index.html).
The repository manual and notebooks live under [`docs/manual`](docs/manual).

## Development

```bash
git clone https://github.com/nilmtk/nilmtk.git
cd nilmtk
uv sync --extra dev
uv run pytest tests
```

Before opening a pull request, run the narrow test for your change, the current
package gate, and the documentation contract:

```bash
uv run pytest tests
uv run python scripts/check_docs.py
uv build
```

The historical core regression tests live under `nilmtk/tests` and
`nilmtk/stats/tests`. Run the affected files explicitly when changing those
modules; work to bring those fixtures into the default gate is tracked
separately.

Changes to dataset semantics belong in NILM Metadata. New model architectures
belong in nilmtk-contrib. Benchmark task definitions and published result
bundles belong in NILMbench.

## Citation

If you use core dataset conversion, meter abstractions, preprocessing, or
metrics, cite the NILMTK paper:

```bibtex
@inproceedings{batra2014nilmtk,
  title     = {NILMTK: An Open Source Toolkit for Non-intrusive Load Monitoring},
  author    = {Batra, Nipun and Kelly, Jack and Parson, Oliver and Dutta, Haimonti
               and Knottenbelt, William and Rogers, Alex and Singh, Amarjeet
               and Srivastava, Mani},
  booktitle = {Proceedings of the 5th ACM International Conference on Future
               Energy Systems},
  year      = {2014},
  pages     = {265--276},
  doi       = {10.1145/2602044.2602051}
}
```

Also cite the [NILM Metadata paper](https://doi.org/10.1109/COMPSACW.2014.97)
when relying on its schema or taxonomy, the
[nilmtk-contrib paper](https://doi.org/10.1145/3360322.3360844) when using its
model suite, and the [NILMBench2026 paper](https://doi.org/10.1145/3744256.3812587)
when using its protocols, runner, or leaderboard results. Always cite the
original model and dataset papers as well.

## Help and license

Search [existing issues](https://github.com/nilmtk/nilmtk/issues) before opening
a report. Include the exact command, operating system, Python version, dataset
identity, and a minimal reproducer.

NILMTK is released under the [Apache License 2.0](LICENSE).
↑