63ef8bfa3b63090437bd27bf1e04db7ae1eae3cf,nilmtk/stats/totalenergy.py,,get_total_energy,#,39

Before Change



    energy = {}
    data_source_rank = {} // overwrite Power with Energy with Energy(cumulative)
    for (physical_quantity, ac_type), series in df.iteritems():
        if physical_quantity == "power":
            // Preference is to calculate energy from 
            // native Energy data rather than Power data

After Change



    // Select a column based on ordered preferences
    PHYSICAL_QUANTITY_PREFS = ["cumulative energy", "energy", "power"]
    selected_columns = []
    for ac_type in AC_TYPES:
        physical_quantities = [physical_quantity 
                               for (physical_quantity, col_ac_type) in df.keys()
                               if col_ac_type == ac_type]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: nilmtk/nilmtk
Commit Name: 63ef8bfa3b63090437bd27bf1e04db7ae1eae3cf
Time: 2014-11-27
Author: jack-list@xlk.org.uk
File Name: nilmtk/stats/totalenergy.py
Class Name:
Method Name: get_total_energy


Project Name: UFAL-DSG/tgen
Commit Name: 72d22e70b310098d8198a78a3c008ffde96bc28e
Time: 2014-10-30
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/eval.py
Class Name: Stats
Method Name: __str__


Project Name: erikbern/ann-benchmarks
Commit Name: 846c2362e2846115145417d95373b2bec54510fb
Time: 2015-06-02
Author: mail@erikbern.com
File Name: plot.py
Class Name:
Method Name: