e801c195eca0e136b6766990e3e2379708eb4dd6,t2t_csaky/scripts/hred_metrics.py,,similarity,#,61

Before Change


    similarities.append(source_hash.jaccard(target_hash))

  avg_similarity = sum(similarities) / len(similarities)
  print("average similarity: " + str(avg_similarity))
  source_file.close()
  target_file.close()

After Change



  avg_similarity = sum(similarities) / len(similarities)
  sim_std = math.sqrt(
      sum([(x - avg_similarity) ** 2 for x in similarities]) /
      (len(similarities) - 1))

  sim = "average similarity: " + str(avg_similarity) + " (%f)" % (sim_std)
  print(sim)
  output.write(sim + "\n")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: ricsinaruto/Seq2seqChatbots
Commit Name: e801c195eca0e136b6766990e3e2379708eb4dd6
Time: 2018-09-28
Author: ricsinaruto@hotmail.com
File Name: t2t_csaky/scripts/hred_metrics.py
Class Name:
Method Name: similarity


Project Name: suavecode/SUAVE
Commit Name: 72c1af76ce43093d761b6f29c8ab446d08030545
Time: 2019-02-02
Author: mclarke2@stanford.edu
File Name: trunk/SUAVE/Methods/Aerodynamics/VTOL_Aero/vtol_weissinger_vortex_lattice.py
Class Name:
Method Name: compute_forces


Project Name: nilmtk/nilmtk
Commit Name: 01f220abe34a8539732faacc90ff14c3f4e14f35
Time: 2014-12-01
Author: nipunreddevil@gmail.com
File Name: nilmtk/elecmeter.py
Class Name: ElecMeter
Method Name: entropy