SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1404.3878 · 2014

NILMTK: An Open Source Toolkit for Non-intrusive Load Monitoring

arXiv · PDF · Open in the Atlas

Code that ran

5 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 0 failures of our instrument; 5 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1404.3878.json · badge: /api/ran/1404.3878.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
nilmtk/nilmtk canonical (classifier label)
classifier basis: census
5 ran · 4 no recorded run
PKMap/nilmtk community (classifier label)
classifier basis not recorded on the link
0 ran · 1 no recorded run
FunctionStatusWhere it lives
f1score Ran
ran on a synthesized input
nilmtk/nilmtk/nilmtk/losses.py
code served (permissive licence) · get_code("204069e2313f2dcd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from sklearn.metrics import f1_score as sklearn_f1_score

# The function f1score takes two parameters:
# - app_gt: ground truth values (will be converted to array and thresholded)
# - app_pred: predicted values (will be converted to array and thresholded)

# Create sample ground truth and predictions
# Mix of values below and above threshold (10) to make F1 score meaningful
app_gt = [2, 5, 15, 20, 3, 18, 8, 25]
app_pred = [3, 8, 12, 22, 1, 19, 10, 23]

ARGS = {
    "app_gt": app_gt,
    "app_pred": app_pred
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_vampire_power Ran
ran on a synthesized input
nilmtk/nilmtk/nilmtk/electric.py
code served (permissive licence) · get_code("cf9752415ae4da4d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function calls .min() on power_series, so it needs to be a tensor
# or tensor-like object with a min() method
power_series = torch.randn(2, 4)

ARGS = {
    "power_series": power_series
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
mae Ran
ran on a synthesized input
nilmtk/nilmtk/nilmtk/losses.py
code served (permissive licence) · get_code("9ac0edff092e856a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from sklearn.metrics import mean_absolute_error

# The mae function takes two parameters: app_gt and app_pred
# Both are passed to mean_absolute_error, which expects array-like objects
# with matching shapes (ground truth values and predicted values)

# Create small ground truth values
app_gt = np.array([1.0, 2.5, 3.2, 4.1])

# Create small predicted values with same shape
app_pred = np.array([1.1, 2.3, 3.5, 3.9])

ARGS = {
    "app_gt": app_gt,
    "app_pred": app_pred,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
rmse Ran
ran on a synthesized input
nilmtk/nilmtk/nilmtk/losses.py
code served (permissive licence) · get_code("93b41829513a8250")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from sklearn.metrics import mean_squared_error

torch.manual_seed(0)

# The rmse function takes two array-like inputs: app_gt and app_pred
# It passes them to mean_squared_error which expects array-like objects
# Create small numpy arrays with distinct shapes to allow probing

app_gt = np.array([1.0, 2.0, 3.0, 4.0])
app_pred = np.array([1.1, 2.1, 2.9, 3.9])

ARGS = {
    "app_gt": app_gt,
    "app_pred": app_pred
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
select_best_ac_type Ran
ran on a synthesized input
nilmtk/nilmtk/nilmtk/measurement.py
code served (permissive licence) · get_code("842800caf52ba326")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from warnings import warn

AC_TYPES = ['active', 'apparent', 'reactive']

def select_best_ac_type(available_ac_types, mains_ac_types=None):
    """Selects the 'best' alternating current measurement type from 
    `available_ac_types`.

    Parameters
    ----------
    available_ac_types : list of strings
        e.g. ['active', 'reactive']
    mains_ac_types : list of strings, optional
        if provided then will try to select the best AC type from `available_ac_types`
        which is also in `mains_ac_types`.
        If none of the measurements from `mains_ac_types` are 
        available then will raise a warning and will select another ac type.

    Returns
    -------
    best_ac_type : string
    """
    if mains_ac_types is None:
        order_of_preference = AC_TYPES
    else:
        order_of_preference = [ac_type for ac_type in AC_TYPES if ac_type in mains_ac_types]
    for ac_type in order_of_preference:
        if ac_type in available_ac_types:
            return ac_type
    if mains_ac_types is None:
        raise KeyError('No relevant measurements in {}'.format(available_ac_types))
    else:
        warn('None of the AC types recorded by Mains are present in `available_ac_types`. Will use try using one of {}.'.format(AC_TYPES), RuntimeWarning)
        return select_best_ac_type(available_ac_types)


ARGS = {
    'available_ac_types': ['active', 'reactive'],
    'mains_ac_types': ['active', 'apparent']
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
combine_chunks_from_generators Not yet run
unverified (harvested, no recorded run)
nilmtk/nilmtk/nilmtk/metergroup.py
code served (permissive licence) · get_code("1c203f40962b9cd9")
How it ran

no invocation recorded.

combine_chunks_from_generators Not yet run
unverified (harvested, no recorded run)
PKMap/nilmtk/nilmtk/metergroup.py
code served (permissive licence) · get_code("7ad31b1d4dff6a46")
How it ran

no invocation recorded.

get_activations Not yet run
unverified (harvested, no recorded run)
nilmtk/nilmtk/nilmtk/electric.py
code served (permissive licence) · get_code("bc8862f5db26e09c")
How it ran

no invocation recorded.

iterate_through_submeters_of_two_metergroups Not yet run
unverified (harvested, no recorded run)
nilmtk/nilmtk/nilmtk/metergroup.py
code served (permissive licence) · get_code("0f59ac773bf4d2ad")
How it ran

no invocation recorded.

replace_dataset Not yet run
unverified (harvested, no recorded run)
nilmtk/nilmtk/nilmtk/metergroup.py
code served (permissive licence) · get_code("8ac30c369c242c1a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Non-intrusive load monitoring, or energy disaggregation, aims to separate household energy consumption data collected from a single point of measurement into appliance-level consumption data. In recent years, the field has rapidly expanded due to increased interest as national deployments of smart meters have begun in many countries. However, empirically comparing disaggregation algorithms is currently virtually impossible. This is due to the different data sets used, the lack of reference implementations of these algorithms and the variety of accuracy metrics employed. To address this challenge, we present the Non-intrusive Load Monitoring Toolkit (NILMTK); an open source toolkit designed specifically to enable the comparison of energy disaggregation algorithms in a reproducible manner. This work is the first research to compare multiple disaggregation approaches across multiple publicly available data sets. Our toolkit includes parsers for a range of existing data sets, a collection of preprocessing algorithms, a set of statistics for describing data sets, two reference benchmark disaggregation algorithms and a suite of accuracy metrics. We demonstrate the range of reproducible analyses which are made possible by our toolkit, including the analysis of six publicly available data sets and the evaluation of both benchmark disaggregation algorithms across such data sets.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1404.3878")
get_code_for_paper("1404.3878")
have("1404.3878")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1404.3878.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1404.3878.svg)](https://syntology.ai/paper/1404.3878)

Connect an agent — have() is free.