Edited Nearest Neighbor removes any example whose class label differs from the class of at least two of its three nearest neighbors.

1 |

`X` |
the input variables of the unbalanced dataset. |

`Y` |
the response variable of the unbalanced dataset. It must be a binary factor where the majority class is coded as 0 and the minority as 1. |

`k` |
the number of neighbours to use |

`verbose` |
print extra information (TRUE/FALSE) |

In order to compute nearest neighbors, only numeric features are allowed.

The function returns a list:

`X` |
input variables |

`Y` |
response variable |

D. Wilson. Asymptotic properties of nearest neighbor rules using edited data. Systems, Man and Cybernetics, IEEE Transactions on, 408-421, 1972.

`ubBalance`

1 2 3 4 5 6 7 8 | ```
library(unbalanced)
data(ubIonosphere)
n<-ncol(ubIonosphere)
output<-ubIonosphere$Class
input<-ubIonosphere[ ,-n]
data<-ubENN(X=input, Y= output)
newData<-cbind(data$X, data$Y)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.