_scripts surface gradientΒΆ

Usage

Run using mc_script _scripts surface gradient after installation or using ~ndcn0236/bin/mc_script _scripts surface gradient on jalapeno.

Import in python using from mcot.core._scripts.surface import gradient

Documentation

Computes the feature similarity with the neighbouring vertices

All relevant distance metric from scipy are included (https://docs.scipy.org/doc/scipy/reference/spatial.distance.html) as well as histogram intersection (http://blog.datadive.net/histogram-intersection-for-change-detection/).

Functions

distance(graph, features[, metric]) Computes the distance between neighbouring feature sets
reduce(distance[, method]) Summarises a NxN sparse matrix of distances as a (N, ) array of distances
run(surface, arr[, distance_metric, reduction]) Computes the reduced distance between neighbouring vertices

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