Description Usage Arguments Value Examples
View source: R/FTRLProx_predict.R
An advanced interface for FTRL-Proximal online learning model predicting.
1 | FTRLProx_predict(model, newx)
|
model |
a FTRL-Proximal linear model object. |
newx |
a transposed |
an vector of linear model predicted values
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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)
m.test <- FTRLProx_Hashing(~ 0 + ., ipinyou.test[,-"IsClick", with = FALSE],
hash.size = 2^13, signed.hash = FALSE, verbose = TRUE)
ftrl_model <- FTRLProx_train(m.train, y = as.numeric(ipinyou.train$IsClick), family = "binomial",
params = list(alpha = 0.01, beta = 0.1, l1 = 1.0, l2 = 1.0),
epoch = 10, verbose = TRUE)
pred_ftrl <- FTRLProx_predict(ftrl_model, newx = m.test)
AUC(pred_ftrl, as.numeric(ipinyou.test$IsClick))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.