SVM¶
- class frlearn.data_descriptors.SVM(nu: float = 0.2, c: float | Callable[[int], float] = <function multiple.<locals>._f>, preprocessors=(<frlearn.statistics.feature_preprocessors.IQRNormaliser object>,), **sklearn_params)[source]¶
Wrapper for the Support Vector Machine (SVM) data descriptor [1] with gaussian kernel, implemented in scikit-learn. Expresses the signed distance to the separating hyperplane, scaled to [0, 1].
- Parameters
- nufloat = 0.20
How many nearest neighbour distances / localised proximities to consider. Corresponds to the scale at which proximity is evaluated. Should be either a positive integer not larger than the target class size, or a function that takes the size of the target class and returns such an integer.
- cfloat or (int -> float) = 0.25 * m
Kernel width. Should be either a positive float or a function that takes the dimensionality of the target class and returns such a float.
- preprocessorsiterable = (IQRNormaliser(), )
Preprocessors to apply. The default interquartile range normaliser rescales all features to ensure that they all have the same interquartile range.
- sklearn_params
Additional keyword parameters will be passed on as-is to scikit-learn’s OneClassSVM constructor.
Notes
nu and c are the two principal hyperparameters that can be tuned to increase performance. Its default values are based on the empirical evaluation in [2].
References