PRTools Contents

PRTools User Guide

cat2feat

CAT2FEAT

Fixed_cell mapping converting categorical data to numeric features

    [F,L] = CAT2FEAT(C)
    [F,L] = C*CAT2FEAT

Input
 C Categorical array or cell array of categorial data

Output
 F Numeric feature set, indices to L
 L Cell array of table of categories

Description

Categorical 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 also

datasets, mappings, setfeatdom, getfeatdom, renumlab, misval, cat2dset, cat2real,

PRTools Contents

PRTools User Guide

This file has been automatically generated. If badly readable, use the help-command in Matlab.