A DML Algorithm that obtains a transformer that maximizes the distance between the nearest friends and the nearest enemies for each example.
ANMM(num_dims = NULL, n_friends = 3, n_enemies = 1)
num_dims | Dimension desired for the transformed data. Integer. If NULL, all features will be taken. Integer. |
---|---|
n_friends | Number of nearest same-class neighbors to compute homogeneus neighborhood. Integer. |
n_enemies | Number of nearest different-class neighbors to compute heterogeneus neigborhood. Integer. |
The ANMM transformer, structured as a named list.
Fei Wang and Changshui Zhang. “Feature extraction by maximizing the average neighborhood margin”. In: Computer Vision and Pattern Recognition, 2007. CVPR’07. IEEE Conference on. IEEE. 2007, pages 1-8.