Create a vw data file from a R data.frame object
1 2 |
data |
[data.table] data.table format (to be transformed) |
fileName |
[string] file name of the resulting data in VW-friendly format |
namespaces |
[list / yaml file] name of each namespace and each variable for each namespace can be a R list, or a YAML file example namespace with the IRIS database: namespaces = list(sepal = list(varName = c('Sepal.Length', 'Sepal.Width'), keepSpace=F), petal = list(varName = c('Petal.Length', 'Petal.Width'), keepSpace=F)) this creates 2 namespaces (sepal and petal) containing the variables defined by varName. keepSpace allows to keep or remove spaces in categorical variables example: "FERRARI 4Si" ==> "FERRARI_4Si" with keepSpace = F ==> "FERRARI 4Si" with keepSpace = T (interpreted by VW as two distinct categorical variables) |
target |
[string] target of the data (target) |
weight |
[string] weight of each line of the dataset (importance) |
tag |
[string] tag of each line of the dataset |
hard_parse |
[bool] if equals true, parses the data more strictly to avoid feeding VW with false categorical variables like '_', or same variables perceived differently like "_var" and "var" |
append |
[bool] data to be appended to result file |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.