Description Usage Arguments Details Value References See Also Examples
Fits a generic joint density model for the predictors and class variables.
1 |
formula |
an object of class "formula"; same as |
data |
matrix, data frame, list or environment (or object coercible by
|
jd_method |
an object of class |
... |
additional parameters passed to |
For predicting the class or conditional probabilities, see,
predict.jdify()
.
An object of class jdify
.
Nagler, T. (2017). A generic approach to nonparametric function estimation with mixed data. arXiv:1704.07457
predict.jdify()
, assess_clsfyr()
1 2 3 4 5 6 7 8 9 10 11 12 13 | # simulate training and test data
dat <- data.frame(
cl = as.factor(rbinom(10, 1, 0.5)),
x1 = rnorm(10),
x2 = ordered(rbinom(10, 1, 0.3), 0:1)
)
model <- jdify(cl ~ x1 + x2, dat) # fitted joint density
pred <- predict(model, dat) # class predictions
probs <- predict(model, dat, what = "probs") # conditional probabilities
# in-sample performance
assess_clsfyr(probs[, 1], dat[, 1] == 0, measure = c("ACC", "F1"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.