dc3beb6aa73c999ed18a791c0ca85b552d0b1cb6,Python/phate/phate.py,PHATE,_calculate_potential,#PHATE#,840
Before Change
t_max=t_max, plot=plot_optimal_t, ax=ax)
else:
t = self.t
tasklogger.log_start("diffusion potential")
// diffused diffusion operator
diff_op_t = np.linalg.matrix_power(self.diff_op, t)
if self.gamma == 1:
// handling small values
diff_op_t = diff_op_t + 1e-7
self._diff_potential = -1 * np.log(diff_op_t)
elif self.gamma == -1:
self._diff_potential = diff_op_t
else:
c = (1 - self.gamma) / 2
self._diff_potential = ((diff_op_t)**c) / c
tasklogger.log_complete("diffusion potential")
elif plot_optimal_t:
self._find_optimal_t(t_max=t_max, plot=plot_optimal_t, ax=ax)
return self._diff_potential
After Change
t_max=t_max, plot=plot_optimal_t, ax=ax)
else:
t = self.t
with _logger.task("diffusion potential"):
// diffused diffusion operator
diff_op_t = np.linalg.matrix_power(self.diff_op, t)
if self.gamma == 1:
// handling small values
diff_op_t = diff_op_t + 1e-7
self._diff_potential = -1 * np.log(diff_op_t)
elif self.gamma == -1:
self._diff_potential = diff_op_t
else:
c = (1 - self.gamma) / 2
self._diff_potential = ((diff_op_t)**c) / c
elif plot_optimal_t:
self._find_optimal_t(t_max=t_max, plot=plot_optimal_t, ax=ax)
return self._diff_potential
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: KrishnaswamyLab/PHATE
Commit Name: dc3beb6aa73c999ed18a791c0ca85b552d0b1cb6
Time: 2019-10-13
Author: scottgigante@gmail.com
File Name: Python/phate/phate.py
Class Name: PHATE
Method Name: _calculate_potential
Project Name: KrishnaswamyLab/PHATE
Commit Name: dc3beb6aa73c999ed18a791c0ca85b552d0b1cb6
Time: 2019-10-13
Author: scottgigante@gmail.com
File Name: Python/phate/phate.py
Class Name: PHATE
Method Name: fit_transform
Project Name: KrishnaswamyLab/PHATE
Commit Name: dc3beb6aa73c999ed18a791c0ca85b552d0b1cb6
Time: 2019-10-13
Author: scottgigante@gmail.com
File Name: Python/phate/phate.py
Class Name: PHATE
Method Name: fit
Project Name: KrishnaswamyLab/PHATE
Commit Name: dc3beb6aa73c999ed18a791c0ca85b552d0b1cb6
Time: 2019-10-13
Author: scottgigante@gmail.com
File Name: Python/phate/phate.py
Class Name: PHATE
Method Name: _find_optimal_t