bord_noise: Mislabeling based on k-nearest neighbors

View source: R/000_common.R

bord_noiseR Documentation

Mislabeling based on k-nearest neighbors

Description

Computation of a noisy label based on majority class among k nearest neighbors with different label.

Usage

bord_noise(x, y, num_noise, idx_noise, k)

Arguments

x

a data frame of input attributes.

y

a factor vector with the output class of each sample.

num_noise

an integer with the number of noisy samples.

idx_noise

an integer vector with the indices of noisy samples.

k

an integer with the number of nearest neighbors to use.

Value

A vector of length length(y) with the class of each sample, including the new noisy classes for the samples with indices idx_noise.


noisemodel documentation built on Oct. 17, 2022, 9:05 a.m.