skclean.detectors.RkDN¶
-
class
skclean.detectors.
RkDN
(n_neighbors=5, weight='uniform', n_jobs=1)¶ For each sample, the percentage of it’s nearest neighbors with same label serves as it’s conf_score. Euclidean distance is used to find the nearest neighbors. See [WCO+18][SMGC14] for details.
- Parameters
n_neighbors (int, default=5) – No of nearest neighbors to use to compute conf_score
weight (string, default='uniform') – weight function used in prediction. If ‘uniform’, all points in each neighborhood are weighted equally. If ‘distance’, weights points by the inverse of their distance.
n_jobs (int, default=1) – No of parallel cpu cores to use
Methods
__init__
([n_neighbors, weight, n_jobs])Initialize self.
detect
(X, y)fit_transform
(X[, y])Fit to data, then transform it.
get_params
([deep])Get parameters for this estimator.
set_params
(**params)Set the parameters of this estimator.
transform
(X)