Learn R Programming

FeatureHashing (version 0.9.2)

hash.mapping: Extract mapping between hash and original values

Description

Extract mapping between hash and original values

Usage

hash.mapping(matrix)

Value

a named numeric vector

Arguments

matrix

Matrix returned by hashed.model.matrix function

Author

Michael Benesty

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
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 DataLab