hash.mapping {FeatureHashing} | R Documentation |
Extract mapping between hash and original values
Description
Extract mapping between hash and original values
Usage
hash.mapping(matrix)
Arguments
matrix |
Matrix returned by |
Details
Generate a mapping between original values and hashes.
Option create.mapping = T
needs to be used in function hashed.model.matrix
.
Original values are stores in the names of the vector.
Value
a named numeric
vector
Author(s)
Michael Benesty
Examples
data(ipinyou)
m <- hashed.model.matrix(~., ipinyou.train, 2^10, create.mapping = TRUE)
mapping <- hash.mapping(m)
[Package FeatureHashing version 0.9.2 Index]