bd9bdcb334be151fe0195d8685d575355df5a551,third_party/nucleus/util/genomics_math.py,,log10sumexp,#Any#,192

Before Change


  Returns:
    Float.
  
  return LOG_10_OF_E * scipy.special.logsumexp(
      np.array(log10_probs) * LOG_E_OF_10)


def normalize_log10_probs(log10_probs):
  Approximately normalizes log10 probabilities.

After Change


    Float.
  
  m = max(log10_probs)
  return m + math.log10(sum(pow(10.0, x - m) for x in log10_probs))


def normalize_log10_probs(log10_probs):
  Approximately normalizes log10 probabilities.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: google/deepvariant
Commit Name: bd9bdcb334be151fe0195d8685d575355df5a551
Time: 2018-11-02
Author: no-reply@google.com
File Name: third_party/nucleus/util/genomics_math.py
Class Name:
Method Name: log10sumexp


Project Name: d2l-ai/d2l-zh
Commit Name: 3a770cbc97085c2cd4eaa0a46b2bc037f35389c2
Time: 2017-10-25
Author: muli@cs.cmu.edu
File Name: utils.py
Class Name:
Method Name: evaluate_accuracy


Project Name: OpenNMT/OpenNMT-py
Commit Name: 8a70c277c355fe734a01fe58baafdc2dc5164205
Time: 2016-12-29
Author: alerer@fb.com
File Name: OpenNMT/train.py
Class Name:
Method Name: eval