Description Usage Arguments Value Examples
View source: R/FTRLProx_Matrix_Match.R
Transform a sparse "design" matrix to assigned schema for FTRL-Proximal Algorithm.
1 | FTRLProx_Matrix_Match(data, feature_name)
|
data |
a object of |
feature_name |
the feature name of design matrix |
constructed dataset, an object of class "ftrl.Dataset"
1 2 3 4 5 6 7 8 9 10 | library(data.table)
library(FeatureHashing)
data(ipinyou)
f <- ~ 0 + BidID + IP + City + AdExchange + BiddingPrice + PayingPrice
m.train <- FTRLProx_Model_Matrix(f, ipinyou.train[, -"IsClick", with = FALSE])
m.test <- FTRLProx_Model_Matrix(f, ipinyou.test[, -"IsClick", with = FALSE])
identical(rownames(m.train$X), rownames(m.test$X))
m.test <- FTRLProx_Matrix_Match(m.test, rownames(m.train$X))
identical(rownames(m.train$X), rownames(m.test$X))
m.test$Mapping
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.