data_manipulation.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:Diffusion_Maps 作者: ehthiede 项目源码 文件源码
def clean_basis(basis,traj_edges,delay,orthogonalize=True):
    # Normalize the eigenvectors
    N,k = np.shape(basis)
    t_0_indices, t_lag_indices = start_stop_indices(traj_edges,delay)
    evec_norm = np.linalg.norm(basis,axis=0)
    basis *= np.sqrt(N)/evec_norm

    # Calculate orthogonal coefficients
    if orthogonalize:
        basis_t_0 = basis[t_0_indices]
        Q,R = spl.qr(basis_t_0)
        R_sub = R[:k,:k]
        basis = np.dot(basis,R_sub)
    return basis
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号