PRTools Contents

PRTools User Guide

cat2data

CAT2DATA

Create categorical dataset

    A = CAT2DATA(DATA,LABELS)

Input
 DATA Cell array or integer array with categorical data
 LABELS Desired labels, default: unlabeled

Output
 A Dataset

Description

This routine creates a dataset of categorical data, either given as  integers, or as a set of string arrays. If given the dataset is labeled  by LABELS. In case DATA is a cell array of size [1,K], it is assumed that  every cell contains a string array of M named categories, in which M is  the number of objects. In case DATA is a cell array of size [M,1], it is  assumed that every cell contains a string array of K named categories,  one for every feature. Alternatively DATA can be a [M,K] cell array  containing a single string per cell.

The routine FEAT2LAB may be used to convert a categorical feature into a  class label.

A categorical dataset A can be combined with a dataset B representing a  set of numeric features for the same objects by [A B].

See also

datasets, prdataset, setfeatdom, getfeatdom, feat2lab,

PRTools Contents

PRTools User Guide

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