Transforms a wfm to the format used by BMR/BLR

wfm2bmr(y, wfm, filename)

Arguments

y

integer dependent variable, may be NULL

wfm

a word frequency matrix

filename

Name of the file to save data to

Value

A file containing the variables in in sparse matrix format.

Details

BMR is sparse matrix format similar to that used by SVMlight

Each line contains an optional dependent variable index and a sequence of indexes and feature value pairs divided by colons. Indexes refer to the words with non-zero counts in the original matrix, and the feature values are the counts.

See also

Author

Will Lowe