LNND

class frlearn.data_descriptors.LNND(dissimilarity: str = 'boscovich', k: int = <function log_multiple.<locals>._f>, nn_search: ~frlearn.neighbours.neighbour_search_methods.NeighbourSearchMethod = <frlearn.neighbours.neighbour_search_methods.KDTree object>, preprocessors=(<frlearn.statistics.feature_preprocessors.IQRNormaliser object>, ))[source]

Implementation of the Localised Nearest Neighbour Distance (LNND) data descriptor [Rdc09924e667a-1]_[Rdc09924e667a-2]_.

Parameters
dissimilarity: str or float or (np.array -> float) or ((np.array, np.array) -> float) = ‘boscovich’

The dissimilarity measure to use.

A vector size measure np.array -> float induces a dissimilarity measure through application to y - x. A float is interpreted as Minkowski size with the corresponding value for p. For convenience, a number of popular measures can be referred to by name.

The default is the Boscovich norm (also known as cityblock, Manhattan or taxicab norm).

kint or (int -> float) or None = 3.4 * log n

Which nearest neighbour to consider. Should be either a positive integer, or a function that takes the target class size n and returns a float, or None, which is resolved as n. All such values are rounded to the nearest integer in [1, n].

preprocessorsiterable = (IQRNormaliser(), )

Preprocessors to apply. The default interquartile range normaliser rescales all features to ensure that they all have the same interquartile range.

Notes

The scores are derived with 1/(1 + l_distances). k is the principal hyperparameter that can be tuned to increase performance. Its default value is based on the empirical evaluation in [3].

References

1

de Ridder D, Tax DMJ, Duin RPW (1998). An experimental comparison of one-class classification methods. ASCI`98: Proceedings of the Fourth Annual Conference of the Advanced School for Computing and Imaging, 213–218. ASCI.

2

Tax DMJ, Duin RPW (1998). Outlier detection using classifier instability. SSPR/SPR 1998: Joint IAPR International Workshops on Statistical Techniques in Pattern Recognition and Structural and Syntactic Pattern Recognition, 593–601. Springer. doi: 10.1007/BFb0033283

3

Lenz OU, Peralta D, Cornelis C (2021). Average Localised Proximity: A new data descriptor with good default one-class classification performance. Pattern Recognition, vol 118, no 107991. doi: 10.1016/j.patcog.2021.107991

class Model[source]

Examples using frlearn.data_descriptors.LNND