Let z
represent class denoted by the last level of
truthLabels
. Then the probability returned by
predict(glmnetFit, newData, type = 'response')
is
the probability that the observations belong to class z.
If this probabilty exceeds tau
, we will classify the
observation as belonging to z
.
1 2 | predLossLLRC(glmnetFit, newData, truthLabels, lossMat, tauVec = seq(0.1, 0.9,
by = 0.1), weight = rep(1, NROW(newData)))
|
glmnetFit |
The glmnet fitted object (returned from |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.