binary_cross_entropy | R Documentation |
binary_cross_entropy()
estimates the inverse binary cross-entropy on
the individual and state-level.
binary_cross_entropy(
pred,
data.valid,
loss.unit = c("individuals", "L2 units"),
y,
L2.unit
)
pred |
Predictions of outcome. A numeric vector of outcome predictions. |
data.valid |
Test data set. A tibble of data that was not used for prediction. |
loss.unit |
Loss function unit. A character-valued scalar indicating
whether performance loss should be evaluated at the level of individual
respondents ( |
y |
Outcome variable. A character vector containing the column names of the outcome variable. |
L2.unit |
Geographic unit. A character scalar containing the column name
of the geographic unit in |
Returns a tibble containing two binary cross-entropy prediction errors. The first is measured at the level of individuals and the second is measured at the context level. The tibble dimensions are 2x3 with variables: measure, value and level.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.