cb87a5e687c47f8fb0eca2e52ea3e47326518c6d,Python/phate/phate.py,PHATE,calculate_potential,#PHATE#,657

Before Change


            // handling small values
            diff_op_t = diff_op_t + 1e-7
            diff_potential = -1 * np.log(diff_op_t)
        elif self.potential_method == "sqrt":
            diff_potential = np.sqrt(diff_op_t)
        else:
            raise ValueError("Allowable "potential_method" values: "log" or "
                             ""sqrt". "{}" was passed.".format(
                                 self.potential_method))
        log_complete("diffusion potential")
        return diff_potential

After Change


            // handling small values
            diff_op_t = diff_op_t + 1e-7
            diff_potential = -1 * np.log(diff_op_t)
        elif self.gamma == -1:
            diff_potential = diff_op_t
        else:
            c = (1 - self.gamma) / 2
            diff_potential = ((diff_op_t)**c) / c
        log_complete("diffusion potential")
        return diff_potential
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 11

Instances


Project Name: KrishnaswamyLab/PHATE
Commit Name: cb87a5e687c47f8fb0eca2e52ea3e47326518c6d
Time: 2018-06-01
Author: scottgigante@gmail.com
File Name: Python/phate/phate.py
Class Name: PHATE
Method Name: calculate_potential


Project Name: KhronosGroup/NNEF-Tools
Commit Name: 6cbe9d4a32bb69c140a5a38d56afe6f47a12939f
Time: 2020-06-15
Author: victor.gyenes@gmail.com
File Name: parser/python/nnef/binary.py
Class Name:
Method Name: read_tensor


Project Name: KrishnaswamyLab/PHATE
Commit Name: e5a98adc53c682047bd6873c127c9c94588b28ab
Time: 2019-12-01
Author: scottgigante@gmail.com
File Name: Python/phate/mds.py
Class Name:
Method Name: embed_MDS