// diff_potential = X
if verbose:
print("Calculated diffusion potential in "
"{:.2f} seconds.".format(time.time() - tic))
// if diffusion potential is precomputed (i.e. "mds" or "mds_dist" has
// changed on PHATE object)
else:
if verbose:
print("Using precomputed diffusion potential...")
tic = time.time()
if verbose:
print("Embedding data using {} MDS...".format(mds))
if embedding is None:
embedding = embed_MDS(diff_potential, ndim=n_components, how=mds,
distance_metric=mds_dist, n_jobs=n_jobs,
seed=random_state)
if landmark_transitions is not None:
// return to ambient space
embedding = landmark_transitions.dot(embedding)
if verbose:
print("Embedded data in {:.2f} seconds.".format(time.time() - tic))
else:
if verbose:
print("Using precomputed embedding...")
return embedding, diff_potential
After Change
// // gamma = -1 is just MDS on DM
// diff_potential = X
log_complete("diffusion potential")
// if diffusion potential is precomputed (i.e. "mds" or "mds_dist" has
// changed on PHATE object)
else:
log_info("Using precomputed diffusion potential...")