Sampleset object (Multivariate Analysis Toolbox for MatlabŪ)

written by: Liran Carmel

Last modified: 14:53, Mon 6-Sep-2010

General Description
This is the simplest of the core objects. While datamatrix and grouping carry information associated with samples, the sampleset object merely stores information about the identity of the samples. The idea is that it would be an enriched version of a simple cell array.

Navigate to:     General Description     Class Structure     Class Construction     Class Functions

Class Structure
Each field can be accessed by the dot (.) operation, or by the GET function. The GET function can work on multiple instances simultaneously. Most fields, except for those that are Dependent, can be modified using the dot (.) operation, or by the SET function.
    Field Description Type Default Dedicated Get/Set Function  
    name name of object, should be short and used as identifier. This field will never be empty. string 'unnamed'    
    description verbal description of the class content. string ''    
    source verbal description of the source of information. string ''    
    sample_names cell array of length no_samples listing the names of all samples. cell vector {} samplenames  
  Dependent no_samples number of samples. Set to zero for void objects. integer scalar 0 nosamples  

Class Construction
Empty instance (scalar)
an empty sampleset instance, with all fields initialized to their default values.
syntax: smps = sampleset;
Empty instance (matrix)
a vector of empty sampleset instances.
syntax: smps = sampleset(size);
Copy constructor
one sampleset instance is copied into another.
syntax: smps_destination = sampleset(smps_origin);
Construction by field names
an instance is formed by directly providing field values. Any field which is not dependent is permitted.
syntax: smps = sampleset(field_name, field_value, ...);
example: smps = sampleset('name','demo group','description','no data inside');
Casting from string arrays
a list of names (cell array or character matrix) is transformed into a sampleset object.
syntax: smps = sampleset(name_list);

List of Functions

Display:

show
displays class content.

Information extraction:

sampid
finds the IDs of a list of samples.

Operators:

eq
element-wise logical operator.
union
makes a union of a SAMPLESET with a new list.

SET/GET functions:

get
get method
nosamples
finds the number of samples in samplesets.
samplenames
retrieves the sample names of samplesets.
set
set method

Transformations:

deletesamples
eliminate samples from SAMPLESET instance(s).
reorder
selects a subsets of samples in a specific order.
represent
expresses data in a different sampleset.