pyLDLE2 package
Submodules
pyLDLE2.datasets module
pyLDLE2.gl_ module
- pyLDLE2.gl_.graph_laplacian(neigh_dist, neigh_ind, k_nn, k_tune, gl_type, return_diag=False, use_out_degree=True, tuning='self', doubly_stochastic_max_iter=0)[source]
- pyLDLE2.gl_.sinkhorn(M, k)[source]
Sinkhorn algorithm with fixed number of iterations https://arxiv.org/abs/1306.0895
pyLDLE2.global_reg_ module
- pyLDLE2.global_reg_.build_ortho_optim(d, Utilde, intermed_param, far_off_points=[], repel_by=0.0, beta=None, ret_CCs=False)[source]
- pyLDLE2.global_reg_.compute_alignment_err(d, Utilde, intermed_param, scale_num, far_off_points=[], repel_by=0.0, beta=None)[source]
- pyLDLE2.global_reg_.ltsa_alignment(y, d, Utilde, C, intermed_param, global_opts, seq_of_intermed_views_in_cluster)[source]
- pyLDLE2.global_reg_.procrustes_final(y, d, Utilde, C, intermed_param, seq_of_intermed_views_in_cluster, global_opts)[source]
- pyLDLE2.global_reg_.procrustes_init(seq, rho, y, is_visited_view, d, Utilde, n_Utilde_Utilde, C, c, intermed_param, global_opts, print_freq=1000)[source]
- pyLDLE2.global_reg_.sdp_alignment(y, d, Utilde, C, intermed_param, global_opts, seq_of_intermed_views_in_cluster, solver=None)[source]
pyLDLE2.global_views_ module
- class pyLDLE2.global_views_.GlobalViews(exit_at, print_logs=True, debug=False)[source]
Bases:
object
- compute_color_of_pts_on_tear_heuristic(y, Utilde, C, global_opts, n_Utilde_Utilde, Utildeg=None)[source]
- compute_final_embedding(y, d, d_e, Utilde, C, c, intermed_param, n_Utilde_Utilde, seq_of_intermed_views_in_cluster, parents_of_intermed_views_in_cluster, cluster_of_intermed_view, global_opts, vis, vis_opts, reset=True)[source]
- compute_init_embedding(d, d_e, Utilde, n_Utilde_Utilde, intermed_param, seq_of_intermed_views_in_cluster, parents_of_intermed_views_in_cluster, C, c, vis, vis_opts, global_opts, print_prop=0.25)[source]
- compute_pwise_dist_in_embedding(intermed_param, Utilde, C, global_opts, y=None, dist=None, max_crossings=5, tol=1e-06)[source]
- compute_seq_of_intermediate_views(Utilde, n_C, n_Utilde_Utilde, intermed_param, global_opts, print_prop=0.25)[source]
pyLDLE2.intermed_views_ module
- class pyLDLE2.intermed_views_.IntermedViews(exit_at, verbose=True, debug=False)[source]
Bases:
object
pyLDLE2.ipge_ module
pyLDLE2.ldle_ module
pyLDLE2.local_views_ module
pyLDLE2.util_ module
- pyLDLE2.util_.compute_global_distortions(X, y, n_nbr=10, buml_obj_path='', read_dir_root='', save_dir_root='', n_proc=32)[source]
pyLDLE2.visualize_ module
- class pyLDLE2.visualize_.Visualize(save_dir='')[source]
Bases:
object
- compare_intermediate_high_low_distortion(X, Atilde, Psitilde_gamma, Psitilde_i, zetatilde, c, save_subdir='', figsize=None, s=20)[source]
- compare_local_high_low_distortion(X, Atilde, Psi_gamma, Psi_i, zeta, save_subdir='', figsize=None, s=20)[source]
- data(X, labels, title='Data', figsize=None, s=20, cmap='jet', azim=None, elev=None, colorbar=False)[source]
- global_distortion_viloinplot(dist_dict, ylabel='$\\log(D_k)$', title='violinplot for $\\log(D_k)$', log_scale=True, figsize=None)[source]
- global_distortion_viloinplot_overlay(dist_dicts, label='$\\log(\\mathcal{G}_k)$', title='violinplot for $\\log(\\mathcal{G}_k)$', log_scale=True, figsize=None, color=None, widths=0.5, lw=3, offset1=1, offset2=0.01, legend=True, rotation=0, filled=False, loc_='lower right', bbox_to_anchor_=(1, -0.05, 0.35, 0.35), vert=True, ncol=1, columnspacing=2, prop={'size': 26}, remove_annotation=True)[source]
- global_embedding(y, labels, cmap0, color_of_pts_on_tear=None, cmap1=None, title=None, figsize=None, s=30, set_title=False, elev=None, azim=None)[source]
- global_embedding_images(X, img_shape, y, labels, cmap0, color_of_pts_on_tear=None, cmap1=None, title=None, figsize=None, s=30, zoom=1, offset_ratio=0.2, w_ratio=0.0025)[source]
- global_embedding_images_v2(X, img_shape, y, labels, cmap0, color_of_pts_on_tear=None, cmap1=None, title='images', offset_ratio=0.3, zoom=1, nx=8, ny=8, v_ratio=0.8, w_ratio=0.005, figsize=None, s=30, to_remove=False, k_to_avoid=[], to_T=True)[source]
- intermediate_views(X, phi, Utilde, gamma, Atilde, Psitilde_gamma, Psitilde_i, zetatilde, c, k=None, figsize=(15, 10), s=20, save_subdir='')[source]
- pyLDLE2.visualize_.save_gif(y, labels, vis_obj, fpath, cmap='jet', FPS=10, step_size=15, max_angle=2880, s=1, figsize=(8, 8))[source]
- pyLDLE2.visualize_.set_axes_equal(ax)[source]
Make axes of 3D plot have equal scale so that spheres appear as spheres, cubes as cubes, etc.. This is one possible solution to Matplotlib’s ax.set_aspect(‘equal’) and ax.axis(‘equal’) not working for 3D.
- Input
ax: a matplotlib axis, e.g., as output from plt.gca().