bb7a59f5fc19bc6a967a9a9cfc40e8bd08086aaf,t2t_csaky/data_filtering/filter_problem.py,FilterProblem,find_medoid,#FilterProblem#Any#,164

Before Change


      big_sum=0
      for j1 in range(len(self.clusters[data_tag][i].elements)):
        small_sum=0
        for j2 in range(len(self.clusters[data_tag][i].elements)):
          small_sum+=self.clusters[data_tag][i].elements[j1].distance(
                      self.clusters[data_tag][i].elements[j2])

After Change


          cluster.medoid = element1

      // clear elements after we finished with one cluster
      cluster.elements.clear()
      cluster.targets.clear()

  // find nearest medoid for a data point
  def find_nearest_medoid(self, data_point):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: ricsinaruto/Seq2seqChatbots
Commit Name: bb7a59f5fc19bc6a967a9a9cfc40e8bd08086aaf
Time: 2018-04-26
Author: ricsinaruto@hotmail.com
File Name: t2t_csaky/data_filtering/filter_problem.py
Class Name: FilterProblem
Method Name: find_medoid


Project Name: flow-project/flow
Commit Name: 071b27b1ffc1c38e84f64fafcc126fafa54369a1
Time: 2017-07-05
Author: akreidieh@gmail.com
File Name: cistar-dev/cistar/core/base_env.py
Class Name: SumoEnvironment
Method Name: setup_initial_state


Project Name: biolab/orange3
Commit Name: bc738132fd89fe4057ad75180de834a036c9f113
Time: 2016-07-29
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/widgets/data/owrank.py
Class Name: OWRank
Method Name: updateScores