Tessero\Hierarchy
AI assistant
Build this with Claude Code, Cursor or Copilot
Copy a Tessero-tuned prompt for Tessero\Hierarchy, grounded in 16 real API signatures , into your IDE's AI. No chatbot, just exact context.
apply
static
apply(string $name, mixed ...$args): mixed
Call a function by its SciPy/NumPy name: Hierarchy::apply('log_ndtr', $x).
average
static
average(mixed $y): mixed
Average (UPGMA) linkage (scipy.cluster.hierarchy.average).
centroid
static
centroid(mixed $y): mixed
Centroid (UPGMC) linkage (scipy.cluster.hierarchy.centroid).
complete
static
complete(mixed $y): mixed
Complete/farthest-point linkage (scipy.cluster.hierarchy.complete).
cophenet
static
cophenet(mixed $Z): mixed
Condensed cophenetic distances of a linkage (scipy.cluster.hierarchy.cophenet).
correspond
static
correspond(mixed $Z, mixed $Y): mixed
Whether a linkage Z and condensed distances Y have matching numbers of observations (scipy.cluster.hierarchy.correspond).
cutTree
static
cutTree(mixed $Z, mixed $nClusters = null, mixed $height = null): mixed
Group membership at each requested cut of the dendrogram (scipy.cluster.hierarchy.cut_tree).
fcluster
static
fcluster(mixed $Z, mixed $t, mixed $criterion = 'inconsistent', mixed $depth = 2, mixed $R = null, mixed $monocrit = null): mixed
Flat clusters from a linkage matrix (scipy.cluster.hierarchy.fcluster).
fclusterdata
static
fclusterdata(mixed $X, mixed $t, mixed $criterion = 'inconsistent', mixed $metric = 'euclidean', mixed $depth = 2, mixed $method = 'single'): mixed
Flat clusters directly from observations (scipy.cluster.hierarchy.fclusterdata).
fromMlabLinkage
static
fromMlabLinkage(mixed $Z): mixed
Convert a MATLAB-form linkage matrix to SciPy form (scipy.cluster.hierarchy.from_mlab_linkage).
inconsistent
static
inconsistent(mixed $Z, mixed $d = 2): mixed
Inconsistency matrix of a linkage (scipy.cluster.hierarchy.inconsistent).
isIsomorphic
static
isIsomorphic(mixed $T1, mixed $T2): mixed
Whether two flat-cluster labellings are isomorphic (scipy.cluster.hierarchy.is_isomorphic).
isMonotonic
static
isMonotonic(mixed $Z): mixed
Whether the linkage is monotonic -- non-decreasing merge heights (scipy.cluster.hierarchy.is_monotonic).
isValidIm
static
isValidIm(mixed $R): mixed
Whether R is a valid inconsistency matrix (scipy.cluster.hierarchy.is_valid_im).
isValidLinkage
static
isValidLinkage(mixed $Z): mixed
Whether Z is a valid linkage matrix (scipy.cluster.hierarchy.is_valid_linkage).
leaders
static
leaders(mixed $Z, mixed $T): mixed
Root (leader) nodes of the flat clusters in T (scipy.cluster.hierarchy.leaders).
leavesList
static
leavesList(mixed $Z): mixed
Leaf ids in left-first pre-order dendrogram order (scipy.cluster.hierarchy.leaves_list).
linkage
static
linkage(mixed $y, mixed $method = 'single'): mixed
Agglomerative hierarchical clustering linkage matrix (scipy.cluster.hierarchy.linkage).
maxRstat
static
maxRstat(mixed $Z, mixed $R, mixed $i): mixed
Maximum of inconsistency-matrix statistic i below each non-singleton cluster (scipy.cluster.hierarchy.maxRstat).
maxdists
static
maxdists(mixed $Z): mixed
Maximum merge distance below each non-singleton cluster (scipy.cluster.hierarchy.maxdists).
maxinconsts
static
maxinconsts(mixed $Z, mixed $R): mixed
Maximum inconsistency coefficient below each non-singleton cluster (scipy.cluster.hierarchy.maxinconsts).
median
static
median(mixed $y): mixed
Median (WPGMC) linkage (scipy.cluster.hierarchy.median).
numObsLinkage
static
numObsLinkage(mixed $Z): mixed
Number of original observations in a linkage matrix (scipy.cluster.hierarchy.num_obs_linkage).
optimalLeafOrdering
static
optimalLeafOrdering(mixed $Z, mixed $y, mixed $metric = 'euclidean'): mixed
Reorder a linkage to minimise distances between adjacent leaves (scipy.cluster.hierarchy.optimal_leaf_ordering).
single
static
single(mixed $y): mixed
Single/nearest-point linkage (scipy.cluster.hierarchy.single).
toMlabLinkage
static
toMlabLinkage(mixed $Z): mixed
Convert a linkage matrix to MATLAB form (scipy.cluster.hierarchy.to_mlab_linkage).
ward
static
ward(mixed $y): mixed
Ward variance-minimizing linkage (scipy.cluster.hierarchy.ward).
weighted
static
weighted(mixed $y): mixed
Weighted (WPGMA) linkage (scipy.cluster.hierarchy.weighted).