Description Usage Arguments Value Examples
is.predx_df
will verify that a predx
data frame contains valid predx_class
and predx
columns. as.predx_df
will create a predx
data frame from a list or tibble and add the predx_class
column if not found.
1 2 3 4 5 | validate_predx_df(x, return = F)
is.predx_df(x)
as.predx_df(x)
|
x |
A list or a tibble including a list or column named |
Error message or TRUE.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | as.predx_df(list(
location = c('Mercury', 'Venus', 'Earth'),
target = 'habitability',
predx = list(Binary(0), Binary(0), Binary(1))
))
x <- as.predx_df(
list(
target = c('demoCat', 'demoBinary'),
date = 'tomorrow',
predx = list(
BinCat(
data.frame(
cat = c('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'),
prob = c(0, rep(0.1, 4), 0.25, 0.15, 0.1, rep(0.05, 2))
)
),
Binary(0.1)
)
)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.