visualizeData

PURPOSE ^

Project high dim. data unto principal components (PCA) for visualization.

SYNOPSIS ^

function visualizeData( X, k, IDX, types, C )

DESCRIPTION ^

 Project high dim. data unto principal components (PCA) for visualization.

 Optionally IDX can be specified to indicate different classes for the
 points; in this case points in different classes are displayed using
 different colors. Up to 12 types are handled (for technical reasons
 involving plot), any cluster with a label>12 is assigned the label 12.

 USAGE
  visualizeData( X, k, [IDX], [types], [C] )

 INPUTS
  X       - column vector of data - N vectors of dimension p (X is Nxp)
  k       - dimension to which to reduce data (2 or 3)
  IDX     - [] cluster membership [see kmeans2.m]
  types   - [] cell array of length ntypes of text labels for each type
  C       - [] cluster centers (Kxp)

 OUTPUTS

 EXAMPLE
  X = [randn(100,5); randn(100,5)+4];
  C = [mean(X(1:100,:)); mean(X(101:200,:))];
  IDX = [ones(100,1); 2*ones(100,1)];
  visualizeData( X, 2, IDX, {'type1','type2' }, C);

 See also KMEANS2, DEMOCLUSTER

 Piotr's Computer Vision Matlab Toolbox      Version 2.0
 Copyright 2014 Piotr Dollar.  [pdollar-at-gmail.com]
 Licensed under the Simplified BSD License [see external/bsd.txt]

Generated by m2html © 2003