Vsmatrix object (Multivariate Analysis Toolbox for MatlabŪ)

written by: Liran Carmel

Last modified: 1:11, Thu 9-Sep-2010

General Description
This object describes a matrix that captures the very common situation where measurements of a number of variables are taken for a multitude of samples. This objects inherits from the parent object datamatrix.

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  
    type Type of matrix. It is always 'variable-sample' string 'variable-sample'    
    units units of the variables. cell {}    
    level level of the variables. Can be nominal/ordinal/numerical/unknown cell {}    
    name Inherited from datamatrix. name of object, should be short and used as identifier. This field will never be empty. string 'unnamed'    
    description Inherited from datamatrix. verbal description of the class content. string ''    
    source Inherited from datamatrix. verbal description of the source of information. string ''    
    row_name Inherited from datamatrix. Name of the row-category (for example, in gene arrays it can be "tissue"). string ''    
    row_sampleset Inherited from datamatrix. A sampleset describing the row-samples. sampleset []    
    row_groupings Inherited from datamatrix. grouping objects associated with the row-samples. grouping array []    
    col_name Inherited from datamatrix. Name of the column-category (for example, in gene arrays it can be "genes"). string ''    
    col_sampleset Inherited from datamatrix. A sampleset describing the column-samples. sampleset []    
    col_groupings Inherited from datamatrix. grouping objects associated with the column-samples. grouping array []    
    matrix Inherited from datamatrix. the data matrix. double []    
    transformations Inherited from datamatrix. keeping track on transformations that had been applied previously on the matrix. structure []    
  Dependent no_rows Inherited from datamatrix. number of row-samples. integer scalar 0 norows  
  Dependent no_cols Inherited from datamatrix. number of column-samples. integer scalar 0 nocols  

Class Construction
Empty instance (scalar)
an empty vsmatrix instance, with all fields initialized to their default values.
syntax: vsm = vsmatrix;
Empty instance (matrix)
an array of empty vsmatrix instances.
syntax: vsm = vsmatrix(size,'size');
Copy constructor
one vsmatrix instance is copied into another.
syntax: vsm_destination = vsmatrix(vsm_origin);
Construction by field names
an instance is formed by directly providing field values. Any field which is not dependent is permitted.
syntax: vsm = vsmatrix(field_name, field_value, ...);
Reading-in a matrix
A numerical variable-by-sample matrix is read into a vsmatrix instance.
syntax: vsm = vsmatrix(matrix);

List of Functions

Display:

show
displays class content.
showvariables
displays information about the variables in a VSMATRIX.

I/O functions:

dump
writes the VSMATRIX matrix into an excel sheet.

Inference:

cimean
finds CI for multidimensional mean.
correlate
computes correlation matrix.
detectcore
picks a dense group of samples forming the core of the data.
detectoutliers
detects outliers.
emutualentropy
estimates pairwise mutual entropy
pcorrelate
computes partial correlation matrix.
testmean
tests mean value or mean difference.

Information extraction:

colid
finds the IDs of a list of column-variables. Source: datamatrix.
groupid
finds the IDs of a list of groupings.
iscomplete
checks for complete variables in VSMATRIX.
isnominal
checks for nominal variables in VSMATRIX.
isnumeric
checks for numeric variables in VSMATRIX.
isordinal
checks for ordinal variables in VSMATRIX.
nomissing
finds the number of missing values in each variable.
rowid
finds the IDs of a list of row-variables. Source: datamatrix.
sampid
finds the IDs of a list of samples.
varid
finds the IDs of a list of variables.

Operators:

eq
element-wise logical operator.
ge
element-wise logical operator.
gt
element-wise logical operator.
le
element-wise logical operator.
lt
element-wise logical operator.
ne
element-wise logical operator.
or
restricts (by condition) the samples in a vsmatrix instance.
plus
adds variables and groupings to a vsmatrix

SET/GET functions:

colnames
retrieves the column-variable names. Source: datamatrix.
get
get method
matrix
retrieves the variables-by-samples matrix.
nocols
retrieves the number of columns in DATAMATRIX instances. Source: datamatrix.
nogroupings
retrieves the number of col-groupings in vsmatrix.
norows
retrieves the number of rows in DATAMATRIX instances. Source: datamatrix.
nosamples
retrieves the number of samples in VSMATRIX.
novariables
retrieves the number of variables in vsmatrix.
rownames
retrieves the row-variable names. Source: datamatrix.
samplenames
retrieves the sample names of vsmatrix.
set
set method
variablenames
retrieves the variable names of VSMATRIX.

Transformations:

deletecols
eliminate samples from a VSMATRIX instance.
deleterows
eliminate variables from a VSMATRIX instance.
deletesamples
eliminate samples from a VSMATRIX instance.
deletevariables
eliminate variables from a VSMATRIX instance.
fillin
fills missing data.
filterout
filters out variables or samples.
reorder
selects a subsets of samples in a specific order.
split
splits data matrix into training set and test set.
subset
extracts a subset of the original vsmatrix.
transform
transforms the data matrix.

Variable-wise computations:

entropy
entropy of each variable.
iqr
computes the inter-quartile range of each variable.
max
calculates max of each variable.
mean
calculates mean of each variable.
median
calculates median of each variable.
min
calculates min of each variable.
minmax
calculates min and max of each variable.
quantile
calculates the p-th quantile of each variable.
std
calculates standard deviation of each variable.
sum
calculates sum of each variable.
var
calculates variance of each variable.

Visualization:

hist
computes and plots the histogram of a variable.
plot
plots variables versus samples.
scatter
plots variables versus variables.