Description Usage Arguments Value Examples
View source: R/FTRLProx_importance.R
FTRLProx_importance showes the most important features of FTRL-Proximal Linear Model.
1 | FTRLProx_importance(model)
|
model |
a FTRL-Proximal linear model object. |
A data.table
of the features used in the model with their weight
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | library(data.table)
library(FeatureHashing)
library(MLmetrics)
data(ipinyou)
m.train <- FTRLProx_Hashing(~ 0 + ., ipinyou.train[, -"IsClick", with = FALSE],
hash.size = 2^13, signed.hash = FALSE, verbose = TRUE,
label = as.numeric(ipinyou.train$IsClick))
m.test <- FTRLProx_Hashing(~ 0 + ., ipinyou.test[,-"IsClick", with = FALSE],
hash.size = 2^13, signed.hash = FALSE, verbose = TRUE,
label = as.numeric(ipinyou.test$IsClick))
ftrl_model <- FTRLProx_train(data = m.train, model = NULL,
family = "binomial",
params = list(alpha = 0.01, beta = 0.1,
l1 = 0.1, l2 = 0.1, dropout = 0), epoch = 50,
watchlist = list(test = m.test),
eval = AUC, patience = 5, maximize = TRUE,
nthread = 1, verbose = TRUE)
FTRLProx_importance(ftrl_model)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.