55b6fb811938351d42929228ccbb0281183d8cf6,Python/phate/phate.py,PHATE,von_neumann_entropy,#PHATE#Any#,488

Before Change


            t_max = np.floor(t_max / 2).astype(np.int16)
        _, eigenvalues, _ = svd(self.diff_op)
        entropy = []
        eigenvalues_t = np.copy(eigenvalues)
        for _ in range(t_max):
            prob = eigenvalues_t / np.sum(eigenvalues_t)
            prob = prob + np.finfo(float).eps
            entropy.append(-np.sum(prob * np.log(prob)))
            eigenvalues_t = eigenvalues_t * eigenvalues
        entropy = np.array(entropy)

After Change


            t_max = np.floor(t_max / 2).astype(np.int16)
            t = np.arange(t_max) * 2 + 1
        else:
            t = np.arange(t_max)

        return t, compute_von_neumann_entropy(self.diff_op, t_max=t_max)

    def optimal_t(self, t_max=100, plot=False, ax=None):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: KrishnaswamyLab/PHATE
Commit Name: 55b6fb811938351d42929228ccbb0281183d8cf6
Time: 2018-04-06
Author: scottgigante@gmail.com
File Name: Python/phate/phate.py
Class Name: PHATE
Method Name: von_neumann_entropy


Project Name: scikit-learn/scikit-learn
Commit Name: a68ba97309512f691feb25e6a07af7561fc56e3b
Time: 2019-12-20
Author: g.lemaitre58@gmail.com
File Name: sklearn/inspection/_permutation_importance.py
Class Name:
Method Name: _calculate_permutation_scores


Project Name: dhlab-epfl/dhSegment
Commit Name: 4c396eb38f8696d8869219dc8c20d19a374cbacc
Time: 2018-02-13
Author: seg.benoit@gmail.com
File Name: doc_seg/evaluation/cbad.py
Class Name:
Method Name: cbad_evaluate_folder


Project Name: WZBSocialScienceCenter/tmtoolkit
Commit Name: 9def69a805132ff7549744b5b30a2fa7531fa405
Time: 2019-06-12
Author: markus.konrad@wzb.eu
File Name: tmtoolkit/preprocess/_tmpreproc.py
Class Name: TMPreproc
Method Name: tokens_dataframe