Code covered by the BSD License  

Highlights from
celltonumeric.m

Be the first to rate this file! 4 Downloads (last 30 days) File Size: 1.89 KB File ID: #26369

celltonumeric.m

by Amos Storkey

 

13 Jan 2010

Take cell array data (such as from loadcell) and convert strings to categorical numeric form.

| Watch this File

File Information
Description

Converts string data to numeric form, via numeric references to string arrays. Numeric data is unchanged.

Usually used after loadcell.m and sometimes before datato1ofm.m
Helps make the loaded data more useful!

celltonumeric - convert cell to entirely numeric representation
function [newdata,contentlist] = celltonumeric(data,sharing);

DATA is the complete dataset. It is presumed that all the possible states are represented in the dataset. If not the data should be augmented with dummy data so that this is the case. Each column of DATA corresponds to a different attribute, and each row a different data item. Each attribute must be exclusively numeric or string.

NEWDATA is the output numeric dataset, which is the same size and DATA.

SHARING is an optional binary matrix representing the attribute sharing graph. Connected attributes are presumed to share the same attribute values. The default is no connection to other attributes (unit matrix)

CONTENTLIST is a cell array, with one term for each attribute. CONTENTLIST is empty for attributes which are numeric. For string attributes it gives the map of the corresponding string associated with each number in NEWDATA.

MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
13 Jan 2010 Jos (10584)

Apparently this tool is designed for a specific (self written?) toolbox, as ML cannot find loadcell or datato1ofm. It also requires a "complete dataset" of quite elusive specifications.
 Can you be more specific about the requirements, and perhaps give an example of the inputs and outputs?

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
data import Amos Storkey 13 Jan 2010 10:00:35
data exploration Amos Storkey 13 Jan 2010 10:00:36

Contact us at files@mathworks.com