60bb6399886610d1ff444b40dd43a7e9e3a5bf0d,framework/PostProcessors/Metric.py,Metric,run,#Metric#Any#,271

Before Change


        nodeName = str(self.features[cnt]) + "-" + str(self.targets[cnt])
        outputDict[nodeName] = {}
        for metricInstance in self.metricsDict.values():
          output = metricInstance.distance(inputDict["features"][self.features[cnt]], inputDict["targets"][self.targets[cnt]])
          if hasattr(metricInstance, "metricType"):
            metricName = metricInstance.metricType
          else:
            metricName = metricInstance.type

After Change


        nodeName = str(self.features[cnt]) + "-" + str(self.targets[cnt])
        outputDict[nodeName] = {}
        for metricInstance in self.metricsDict.values():
          inData = []
          for inputKey, subKey in [("features",self.features[cnt]),
                                     ("targets",self.targets[cnt])]:
            if metricInstance.acceptsProbability and subKey in inputDict[inputKey+"_prob"]:
              inData.append((inputDict[inputKey][subKey],
                             inputDict[inputKey+"_prob"][subKey]))
            else:
              inData.append(inputDict[inputKey][subKey])
          output = metricInstance.distance(inData[0], inData[1])
          if hasattr(metricInstance, "metricType"):
            metricName = metricInstance.metricType
          else:
            metricName = metricInstance.type
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: idaholab/raven
Commit Name: 60bb6399886610d1ff444b40dd43a7e9e3a5bf0d
Time: 2017-09-27
Author: joshua.cogliati@inl.gov
File Name: framework/PostProcessors/Metric.py
Class Name: Metric
Method Name: run


Project Name: gboeing/osmnx
Commit Name: c46a77985576103fc92ac95395f4d8410f56f029
Time: 2020-12-02
Author: boeing@usc.edu
File Name: osmnx/distance.py
Class Name:
Method Name: get_nearest_edge


Project Name: gboeing/osmnx
Commit Name: fe8f96e9981376e26984bfa4812916d14856dc05
Time: 2020-11-18
Author: boeing@usc.edu
File Name: osmnx/distance.py
Class Name:
Method Name: get_nearest_edge