Module ImportFrom alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareLt AttributeLoad NameLoad attr NameLoad body Return ListLoad NameLoad Return BinOpAdd Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return BinOpAdd Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return BinOpAdd Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return BinOpAdd Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad BinOpDiv BinOpMult Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Assign NameStore Call NameLoad BinOpDiv BinOpMult Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Assign NameStore BinOpSub NameLoad BinOpAdd NameLoad NameLoad Assign NameStore BinOpAdd NameLoad BinOpAdd NameLoad NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad BinOpAdd NameLoad NameLoad NameLoad BinOpSub NameLoad NameLoad keyword TupleLoad Num Num Num Assign NameStore BinOpMult AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad BinOpAdd NameLoad NameLoad BinOpAdd NameLoad NameLoad BinOpAdd NameLoad NameLoad keyword TupleLoad Num Num Num Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad BinOpSub NameLoad NameLoad BinOpAdd NameLoad NameLoad BinOpSub NameLoad NameLoad keyword TupleLoad Num Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd NameLoad NameLoad BinOpAdd NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd NameLoad NameLoad BinOpSub NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return ListLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return ListLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Num decorator_list FunctionDef arguments args NameParam defaults body Return Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Num Num Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Call NameLoad NameLoad Call NameLoad BinOpSub NameLoad BinOpFloorDiv SubscriptLoad NameLoad Index Num Num Call NameLoad BinOpAdd NameLoad SubscriptLoad NameLoad Index Num Call NameLoad BinOpSub BinOpAdd NameLoad SubscriptLoad NameLoad Index Num BinOpFloorDiv SubscriptLoad NameLoad Index Num Num decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad Call NameLoad BinOpPow BinOpSub NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad Call NameLoad BinOpSub NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Dict Assign NameStore ListComp Call NameLoad Call NameLoad NameLoad keyword NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad While CompareGt Call NameLoad NameLoad Num body Assign NameStore Call NameLoad Str For TupleStore NameStore NameStore Call NameLoad NameLoad Num body If CompareNotIn TupleLoad NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index TupleLoad NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad If CompareLt NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore TupleLoad NameLoad NameLoad Assign TupleStore NameStore NameStore NameLoad Assign NameStore BinOpDiv BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return SubscriptLoad NameLoad Index Num decorator_list ImportFrom alias alias FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str Assign NameStore BinOpMult Call AttributeLoad NameLoad attr Num Assign NameStore Num Assign NameStore BinOpDiv Call NameLoad BinOpSub NameLoad Num Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str TupleLoad NameLoad NameLoad TupleLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad Num BinOpDiv NameLoad Num Num BinOpDiv NameLoad Num keyword TupleLoad Num Num Num Expr Call AttributeLoad NameLoad attr NameLoad Num BinOpDiv NameLoad Num NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list
N/A numpy * itertools combinations ClusterNode N/A object N/A __init__ N/A N/A self vec left right distance count N/A 0.0 1 N/A N/A N/A self left left N/A N/A self right right N/A N/A self vec vec N/A N/A self distance distance N/A N/A self count count N/A extract_clusters N/A N/A self dist N/A N/A N/A  Extract list of sub-tree clusters from 
            hcluster tree with distance<dist.  N/A N/A N/A self distance dist N/A N/A N/A self N/A N/A N/A N/A N/A self left extract_clusters dist N/A N/A N/A self right extract_clusters dist N/A get_cluster_elements N/A N/A self N/A N/A N/A     Return ids for elements in a cluster sub-tree.  N/A N/A N/A N/A N/A self left get_cluster_elements N/A N/A N/A self right get_cluster_elements N/A get_height N/A N/A self N/A N/A N/A     Return the height of a node, 
            height is sum of each branch.  N/A N/A N/A N/A N/A self left get_height N/A N/A N/A self right get_height N/A get_depth N/A N/A self N/A N/A N/A     Return the depth of a node, depth is 
            max of each child plus own distance.  N/A N/A N/A max N/A N/A N/A self left get_depth N/A N/A N/A self right get_depth N/A self distance N/A draw N/A N/A self draw x y s imlist im N/A N/A N/A     Draw nodes recursively with image 
            thumbnails for leaf nodes.  N/A h1 N/A int N/A N/A N/A N/A N/A self left get_height 20 2 N/A h2 N/A int N/A N/A N/A N/A N/A self right get_height 20 2 N/A top N/A y N/A h1 h2 N/A bottom N/A y N/A h1 h2 N/A N/A N/A draw line N/A x N/A top h1 x N/A bottom h2 fill N/A 0 0 0 N/A ll N/A N/A self distance s N/A N/A N/A draw line N/A x N/A top h1 N/A x ll N/A top h1 fill N/A 0 0 0 N/A N/A N/A draw line N/A x N/A bottom h2 N/A x ll N/A bottom h2 fill N/A 0 0 0 N/A N/A N/A N/A self left draw draw N/A x ll N/A top h1 s imlist im N/A N/A N/A N/A self right draw draw N/A x ll N/A bottom h2 s imlist im N/A N/A ClusterLeafNode N/A object N/A __init__ N/A N/A self vec id N/A N/A N/A N/A self vec vec N/A N/A self id id N/A extract_clusters N/A N/A self dist N/A N/A N/A N/A self N/A get_cluster_elements N/A N/A self N/A N/A N/A N/A N/A self id N/A get_height N/A N/A self N/A N/A N/A 1 N/A get_depth N/A N/A self N/A N/A N/A 0 N/A draw N/A N/A self draw x y s imlist im N/A N/A N/A nodeim N/A N/A Image open N/A imlist N/A N/A self id N/A N/A N/A nodeim thumbnail N/A 20 20 N/A ns N/A nodeim size N/A N/A N/A im paste nodeim N/A N/A int x N/A int N/A y N/A N/A ns N/A 1 2 N/A int N/A x N/A ns N/A 0 N/A int N/A N/A y N/A ns N/A 1 N/A N/A ns N/A 1 2 N/A N/A L2dist N/A N/A v1 v2 N/A N/A N/A N/A sqrt N/A sum N/A N/A v1 v2 2 N/A L1dist N/A N/A v1 v2 N/A N/A N/A N/A sum N/A abs N/A v1 v2 N/A hcluster N/A N/A features distfcn N/A L2dist N/A N/A  Cluster the rows of features using 
        hierarchical clustering.  N/A distances N/A N/A node N/A N/A ClusterLeafNode N/A array f id i N/A N/A i f N/A enumerate features N/A N/A N/A len node 1 N/A N/A closest N/A float Inf N/A N/A ni nj N/A combinations node 2 N/A N/A N/A N/A ni nj distances N/A N/A N/A distances N/A N/A ni nj N/A distfcn N/A ni vec N/A nj vec N/A d N/A distances N/A N/A ni nj N/A N/A d closest N/A N/A closest d N/A lowestpair N/A ni nj N/A N/A ni nj lowestpair N/A new_vec N/A N/A N/A ni vec N/A nj vec 2.0 N/A new_node N/A ClusterNode new_vec left ni right nj distance closest N/A N/A N/A node remove ni N/A N/A N/A node remove nj N/A N/A N/A node append new_node N/A N/A node N/A 0 N/A PIL Image ImageDraw draw_dendrogram N/A N/A node imlist filename N/A clusters.jpg N/A N/A     Draw a cluster dendrogram and save to a file.  N/A rows N/A N/A N/A node get_height 20 N/A cols 1200 N/A s N/A N/A float N/A cols 150 N/A N/A node get_depth N/A im N/A N/A Image new RGB N/A cols rows N/A 255 255 255 N/A draw N/A N/A ImageDraw Draw im N/A N/A N/A draw line N/A 0 N/A rows 2 20 N/A rows 2 fill N/A 0 0 0 N/A N/A N/A node draw draw 20 N/A rows 2 s imlist im N/A N/A N/A im save filename N/A N/A N/A im show N/A