# A Visual Mining Approach to Improved Multiple-Instance Learning
## 4 Visual Multiple-Instance Learning
### Creating a Multiple-Instance Tree (MILTree)
Afterwards, we select the optimal positive instance from \(B^{+}\) using a similar procedure, but this time selecting the instance in \(B^{+}\) with the maximum distance to the optimal negative instance found previously. Finally, as we already have the optimal instances (positive and negative), we compute the instance prototypes \(B_{ix}\) and \(B_{iy}\) for positive and negatives bags: \(B_{ix}\) is the instance with the highest salience, and \(B_{iy}\) is the next one with major salience. Figure 2 shows the selection of prototypes (which could be \(B_{ix}\) or \(B_{iy}\)) from negative bags using MILTre-SI. #### 4.3.2 MILTree-Med

Clustering algorithms have been frequently used for selecting prototypes in a feature space defined by the instances in MIL, as presented in Section 3.2.2. The original methods create a new artificial instance that represents a bag by choosing, for instance, a cluster centroid. MILTree-Med, unlike other methods, works in the instance space of each bag, selecting an actual instance without creating new ones, which better complies with the visualization scalability. Each bag is considered a cluster, and the prototype is the medoid of the cluster. Since we want to find two prototypes, the \(k\)-Medoids algorithm is applied with \(k=2\). Since all bags may contain positive and negative instances, we want to identify potentially positive and negative clusters. The medoids of the sub-clusters are the instance prototypes \(B_{ix}\) and \(B_{iy}\). Figure 3 shows the selection of prototypes using MILTree-Med. \(Bag\) represents either a positive or negative bag, \(c\) is the centroid of the bag, \(m_{1}\) and \(m_{2}\) are the medoids of the two sub-clusters and \(d\) are distances between each medoid and the centroid. #### 4.3.3 Updating Instance Prototypes Using MILTree

To create the first MILTree layout, as well as the classifier, we set \(B_{i,protoClass}=B_{i,protoProj}=B_{i,x}\), i.e., the first instance prototype selected by either MILTree-SI or MILTree-Med heuristics. The MILTree was developed so that the user can spot those bags that are poorly represented by the first prototype selection. For those bags, users can then set \(B_{i,protoClass}=B_{iy}\) or manually inspect the bags to select a more representative one. Figure 2: Selection of instance prototypes on negative bags using MILTre-SI. \(B_{i}^{+}\) represents positive bags, \(B_{i}^{-}\) represents negative bags and \(d(B_{iL}^{+},B_{ij}^{-})\) represents the Euclidean distance between the optimal positive and a given negative instance. Two visual representations are available to the user:

1. _Prototype highlighting_: MILTree highlights the current prototype \(B_{ix}\) with a darker color and also \(B_{iy}\), which is the alternative prototype, with a lighter shade. Thus, by inspecting both, the user can validate \(B_{protoClass}\) or update it according to their knowledge by selecting \(B_{iy}\) or even another instance in the instance space layout. Figure 4 shows the instance prototypes \(B_{ix}\) and \(B_{iy}\) projected in the MILTree's instance space layout. In Figure 4a, the SI selection method is used, and in Figure 4b, the models selection is used instead. 2. _SVM class match tree_: the _InstancePrototypes ClassMatch_ tree uses color to contrast the bags that were misclassified, considering a training or validation set for which the labels are known. A similar approach has been successfully used in [21; 33]. In this approach, the instances \(B_{protoClass}\) are used to build an SVM classifier, and the MILTree plots a layout we called _InstancePrototypes ClassMatch_ tree, with colors according to the classification result: pale green for correctly classified and red for misclassified bags. Figure 5a displays the MILTree generated for a subset of the Corel-1000 dataset, where red bags represent positive bags (images of horses) and blue bags represent negative bags (random images from other categories).