• No se han encontrado resultados

CONFIRMAR LAS CONCLUSIONES DEL ESTUDIO CENTROS Y PUESTOS DE SALUD DE LAS ENFERMEDADES TRASMITIDAS POR

Diciembre Noviembre

CONFIRMAR LAS CONCLUSIONES DEL ESTUDIO CENTROS Y PUESTOS DE SALUD DE LAS ENFERMEDADES TRASMITIDAS POR

A tree is a data structure that partitions the data with each branch according to some decision metric and has leaf nodes at the bottom of the tree which each contain a significantly smaller subset of the total data. Trees are constructed recursively, partitioning each subset of the data at each branch until some termination criteria is met. The way the data is partitioned is generally what defines each type of tree. The most common type of trees are binary search trees - each node partitions the data into two subsets, however quadtrees [65] and trees with even more branches per node, such as hash-trees[120], have been previously developed.

Trees can also be grouped into two types according to how they categorise the data:

• Projective trees - these partition points based on their projection into some lower- dimensional space

• Metric trees - these use some metric on defined pairs of points in space, and generally take advantage of the triangle inequality for more efficient data access.

(a) Projective tree (b) Projective tree (c) Metric tree

Figure 2.11: Example of how trees might partition a 2D space. (a) is an axis aligned projective tree, (b) is a non-axis aligned tree. (c) is a generalised metric tree

kd-Tree

Bentley’s kd-tree [23] is a binary search tree and is one of the most commonly used algorithms - it is well known, simple to implement and there are also existing libraries for it in a variety of programming languages3. It splits the data using values from a single dimension at each branch until the size of the subset of data is below a certain threshold. For smaller trees[24], the dimension which with maximum variance is chosen and the split value is usually chosen to be the median value. This results in a fairly balanced partitioning of points into hyper-rectangles (see figure 2.11a) which are axis aligned, but this can lead to poor search performance if the data distribution does not favour this type of dimensional-partitioning. Furthermore, the number of neighbours for each leaf grows exponentially with dimensions and the data structure does not scale well with increases in dimensionality.

PCA Tree

Sproull [163] attempts to remedy the axis-alignment problem in kd-trees by applying Principle Component Ananylsis at each node to obtain the eigenvector corresponding to the maximum variance and then splitting the data along that direction. This still results in linear partitions

3scipy for Python, libkdtree++ for C++, Caltech Large Scale Image Search Toolbox for Matlab - to name

2.5. Nearest Neighbour Search 79

but they are no longer confined to the dimensional axes of the data (see figure 2.11b), but are partitioned by hyperplanes that can be of any orientation.

Ball Tree

The ball tree [124] is a metric tree which splits splits data according to which of two centres that it is closest to. It has similarities to the k-means algorithm, however the centres are chosen and fixed during the start of the construction of each node where construction is as follows:

1. Find the centroid of the dataset for the node.

2. Find the data point that has the greatest distance from the centroid and use that as the first centre.

3. Find the data point that has the greatest distance first centre and use that as the second centre.

4. Partition dataset into two subsets according to which centre the data is closest to.

There is no constraint on the number of data points assigned to each partition and the tree construction terminates when there is less than a certain number of data points at each leaf. The partitioning looks similar to the one for PCA tree, but each hyperplane bisects two centres and data points are partitioned according to distance to these centres rather than just absolute value. This method takes longer to construct than kd-tree and could be highly unbalanced, but could be significantly faster if it discovers the true distribution of data points in the data space.

vp-Tree

Vantage point (vp) trees [194] are similar to ball trees but rather than have multiple centres at each level of the tree, there is only a single centre at each level and data points are parti- tioned according to distance to it. The centre for each node can be chosen randomly or as the

centroid. This splits the data into “hypershells” around each centroid, and the thickness of the “hypershell” can be chosen in a variety of ways.

Other Trees

There are variety of other tree structures that can be used for nearest neighbour search such as cover trees[27], M-trees[42], R-trees[143] and their variants.

Cover tree are a type of metric tree which uses a refinement of the navigating nets data structure[99]. It tries to overcome the issue of space requirement by other tree structures such as kd-tree by making the space requirement linearly proportional to the dataset size, rather than exponentially proportional to the dimensionality. Cover trees are designed so that each level of the tree is a “cover” for the level beneath it, and the level is indexed by an integer scale which decreases as the tree is descended. Each node in the tree is associated to a data point, and each data point can be associated to multiple nodes in the tree, but appearing only once per level. There are 3 invariants that define the cover tree structure - let Ci denote the

set of data points associated with the nodes at level i, d is the distance function:

• Nesting - Ci ⊂ Ci−1. This implies each data point occurs in every level below Ci once

there is a node associated with it.

• Covering tree - for every p ∈ Ci−1, there is a q ∈ Ci such that d(p, q) < 2i and the node

in level i associated with q is a parent of the node in level i − 1 associated with p • Separation - for all distinct p, q ∈ Ci, d(p, q) > 2i

M-trees are defined by an object at each node that identifies it, and a “ball” (within certain radius) around each node which defines the data points which belong to that node. It is similar to ball trees and vp-trees, but the “ball” around each node can overlap with that of another node. Each Leaf has a maximum population and a new node is created during insertion once the maximum population has been reached, splitting the population of the leaf into one of the two new leaves of the node.

2.5. Nearest Neighbour Search 81

R-trees are quite similar to kd-trees in that the data space is divided into hyper-rectangles, however in R-trees, each hyper-rectangles represent a “minimum bounding box” of the data at each level of the tree. There are several variants of R-trees such as R* tree [18], R+ tree[150], Hilbert R-tree [92] and X-tree [25].

Documento similar