CAT2FEAT Fixed_cell mapping converting categorical data to numeric features
[F,L] = CAT2FEAT(C)
DescriptionCategorical data is usual a set of character strings. It can, however, also be a set of numbers (real or integers) that should be interpreted qualitatively instead of quantitatively. This routine uses the PRTools routine RENUMLAB to transform categories feature by feature (columns of C) into sets of tables and indices, such that L{j}F(:,j) equals C{j} with an exception of missing data in C. Missing feature values in C should be coded in character categories by empty strings ('') and by a NaN in numeric categories. They don't have an entry in the tables L and are coded by a NaN in the numeric features F. Use MISVAL to transform them into 0, wherever needed. Use CAT2DSET to convert categorial data into a dataset. Use CAT2REAL to convert (partially) categorical PRTools datasets into reals by splitting categories. See alsodatasets, mappings, setfeatdom, getfeatdom, renumlab, misval, cat2dset, cat2real,
|