626173412d4281b693244e0705a787c4e7c08031,nilmtk/metrics.py,,fraction_energy_assigned_correctly,#,69

Before Change


    re: float representing Fraction of Energy Correctly Assigned
    """

    fraction = np.array([])
    total_energy_predicted = np.sum(predicted_power.values)

    for appliance in predicted_power:

        appliance_energy_predicted = np.sum(predicted_power[appliance].values)

        appliance_energy_ground_truth = np.sum(
            df_appliances_ground_truth[appliance].values)
        total_energy_ground_truth = np.sum(df_appliances_ground_truth.values)

        fraction = np.append(
            fraction, np.min(
                [appliance_energy_predicted / total_energy_predicted,
                 appliance_energy_ground_truth /
                 total_energy_ground_truth
                 ]))

    return np.sum(fraction)

After Change


    fraction_per_meter_ground_truth = ground_truth_submeters.fraction_per_meter()

    fractions = []
    for meter_instance in predictions_submeters.instance():
        fraction = min(fraction_per_meter_predictions[meter_instance],
                       fraction_per_meter_ground_truth[meter_instance])
        fractions.append(fraction)

    return sum(fractions)


//////////////////// FUNCTIONS BELOW THIS LINE HAVE NOT YET CONVERTED TO NILMTK v0.2 //////////
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: nilmtk/nilmtk
Commit Name: 626173412d4281b693244e0705a787c4e7c08031
Time: 2014-07-09
Author: jack-list@xlk.org.uk
File Name: nilmtk/metrics.py
Class Name:
Method Name: fraction_energy_assigned_correctly


Project Name: Esri/raster-functions
Commit Name: e0ff7e10a230b0523d0a4796e38957490a05f8f9
Time: 2015-10-19
Author: akferoz@esri.com
File Name: functions/RankFilter.py
Class Name: RankFilter
Method Name: updatePixels


Project Name: scikit-learn/scikit-learn
Commit Name: f685547f801b13afc0874ed348e3a46600113136
Time: 2020-06-17
Author: alexhenrie24@gmail.com
File Name: sklearn/neural_network/_multilayer_perceptron.py
Class Name: BaseMultilayerPerceptron
Method Name: _backprop


Project Name: luispedro/mahotas
Commit Name: 64624fb2b46a228fef1141e1ded84e52acccaf6e
Time: 2015-06-09
Author: luis@luispedro.org
File Name: bin/mahotas-features.py
Class Name:
Method Name: main