warmstart.ontram | R Documentation |
Set initial weights
## S3 method for class 'ontram'
warmstart(object, object_w, which = c("all", "baseline only", "shift only"))
object |
an object of class |
object_w |
an object of class |
library(tram)
data("wine", package = "ordinal")
fml <- rating ~ temp + contact
x_train <- model.matrix(fml, data = wine)[, -1L]
y_train <- model.matrix(~ 0 + rating, data = wine)
mp <- Polr(fml, data = wine)
mo <- ontram_polr(x_dim = ncol(x_train), y_dim = ncol(y_train))
coef(mp, with_baseline = T)
warmstart(mo, mp, "all")
mod_weights(mo)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.