get.mislabel.scores: get.mislabel.scores

get.mislabel.scoresR Documentation

get.mislabel.scores

Description

Get mislabelled scores of samples

Usage

get.mislabel.scores(y, y.prob)

Arguments

y

A response vector. If a factor, classification is assumed, otherwise regression is assumed.

y.prob

The probability output from the RF model.

Value

mislabelled scores

Author(s)

Shi Huang

Examples

x <- data.frame(rbind(t(rmultinom(7, 75, c(.201,.5,.02,.18,.099))),
            t(rmultinom(8, 75, c(.201,.4,.12,.18,.099))),
            t(rmultinom(15, 75, c(.011,.3,.22,.18,.289))),
            t(rmultinom(15, 75, c(.091,.2,.32,.18,.209))),
            t(rmultinom(15, 75, c(.001,.1,.42,.18,.299)))))
y<-factor(c(rep("A", 15), rep("B", 15), rep("C", 15), rep("D", 15)))
y<- 1:60
rf_model<-rf.out.of.bag(x, y)
get.mislabel.scores(rf_model$y, rf_model$probabilities)

shihuang047/crossRanger documentation built on Feb. 7, 2023, 10:03 p.m.