70b08e1d2e703b4e3d16da9aaa04706dd4413232,pypfopt/hierarchical_portfolio.py,HRPOpt,_get_quasi_diag,#,97

Before Change


        link = link.astype(int)
        // The new clusters formed
        c = np.arange(link.shape[0]) + link[-1, 3]
        root_id = c[-1]
        d = dict(list(zip(c, link[:, 0:2].tolist())))

        // Unpacks the linkage matrix recursively.
        def recursive_unlink(curr, d):
             Start this with curr = root integer 
            if curr in d:
                return [
                    node for parent in d[curr] for node in recursive_unlink(parent, d)
                ]
            else:
                return [curr]

        return recursive_unlink(root_id, d)

    @staticmethod
    def _raw_hrp_allocation(cov, ordered_tickers):
        

After Change


        :return: sorted list of indices
        :rtype: list
        
        return sch.to_tree(link, rd=False).pre_order()

    @staticmethod
    def _raw_hrp_allocation(cov, ordered_tickers):
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: robertmartin8/PyPortfolioOpt
Commit Name: 70b08e1d2e703b4e3d16da9aaa04706dd4413232
Time: 2020-05-01
Author: thomas.schmlezer@gmail.com
File Name: pypfopt/hierarchical_portfolio.py
Class Name: HRPOpt
Method Name: _get_quasi_diag


Project Name: robertmartin8/PyPortfolioOpt
Commit Name: 5e56bcc41a7d147c710e57c4c764651c7e148581
Time: 2020-04-30
Author: thomas.schmlezer@gmail.com
File Name: pypfopt/hierarchical_portfolio.py
Class Name: HRPOpt
Method Name: _get_quasi_diag


Project Name: philipperemy/keras-activations
Commit Name: fe5db3121c4313775181dea4935c764b84b8d357
Time: 2019-01-03
Author: premy@cogent.co.jp
File Name: keract/keract.py
Class Name:
Method Name: get_gradients_of_activations