_scripts parcel randomΒΆ
Usage
Run using mc_script _scripts parcel random after installation or using ~ndcn0236/bin/mc_script _scripts parcel random on jalapeno.
Import in python using from mcot.core._scripts.parcel import random
Documentation
Randomly parcellates a surface
Functions
calc_distance(distance, centers, labels) |
Calculate the distance between the cluster centra and the labels. |
init_center(distance) |
Initalize medoid centers with the points with the lowest total distance. |
init_random(distance) |
Random initialization of the medoid centers. |
kmedoids(distance[, nclus, init, max_loops]) |
Runs the k-medoids clustering algorithm. |
run(surface, ncluster[, max_iter]) |
Creates a random parcellation of the surface based on the distance between surface elements |
uniform_centroids(dist_map, n_centroids) |
Uniformly space n_centroids seeds in a naive way |
update_centers(distance, labels) |
Updates the cluster centers. |
update_labels(distance, centers) |
Update the point labels. |
CLI interface
add_to_parser(parser) |
Creates the parser of the command line arguments |
run_from_args(args) |
Runs the script based on a Namespace containing the command line arguments |