FeatureHashing (version 0.9.1.3)

hash.mapping: Extract mapping between hash and original values

Description

Extract mapping between hash and original values

Usage

hash.mapping(matrix)

Arguments

matrix

Matrix returned by hashed.model.matrix function

Value

a named numeric vector

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.

Examples

Run this code
# NOT RUN {
data(ipinyou)

m <- hashed.model.matrix(~., ipinyou.train, 2^10, create.mapping = TRUE)
mapping <- hash.mapping(m)
# }

Run the code above in your browser using DataCamp Workspace