Documentation of samdata

Global Index (all files) (short | long) | Local contents | Local Index (files in subdir) (short | long)

Function Synopsis

[DataPoints, Labels, DataObj] = samdata(WhatData)

Help text

 Collection of example data for sammon mapping

 This functions returns data of high-dimensional data points.
 Depending on contents of first input parameter data for different
 systems is returned. A second output parameter my contain labels
 of the data points.

 Syntax:  [DataPoints, Labels, DataObj] = samdata(WhatData)

 Input parameter:
    WhatData  - string describing data to produce.
                'helix'   : 3D helix data
                'helix2'  : another 3D helix
                'circles' : 2 circles lying above each with a large distance
                'circles2': 2 circles with low distance
                'circles4': same as 'circles' with 4 pieces of circles
                'objfun2'/'objfun6': 3D representation of these objective functions
                'skulls'  : data of 40 skulls (12 values each)
                'skulls_female' : data of 18 skulls (subset of 'skulls')
                'skulls_male' : data of 23 skulls (subset of 'skulls')
                'kellog'  : data of 23 kellog cereals
                'f2good'  : loading of optimization result^data from file
                            example of high-dimesnional result visualization
                            with the GEATbx

 Output parameter:
    DataPoints- Matrix containing data points, every row corresponds
                   to one point in high-dimensional space
    Labels    - Matrix containing text strings, every row corresponds
                   to the label of the point in the corresponding
                   DataPoints row
    DataObj   - Vector (column) containing the objective values of the
                   data points, can be used for high-dimensional 
                   visualization of search space

 See also: sammon, samplot

Cross-Reference Information

This function calls

Listing of function samdata



% Author:   Hartmut Pohlheim
% History:  29.04.1997  file created
%           04.06.1997  data files for skulls and labels added
%                       second output parameter for labels of
%                          points added
%           09.06.1997  data access to f2 (ROSENBROCK) added
%           xx.xx.2001  many further data examples added
%           17.02.2002  output parameter DataObj added


function [DataPoints, Labels, DataObj] = samdata(WhatData)
 
% Check input parameter
   if nargin < 1, WhatData = []; end
   if isnan(WhatData), WhatData = []; end
   if isempty(WhatData), WhatData ='helix'; end

   % Preset output variables
   DataPoints = []; Labels = []; DataObj = [];


   % Look for parameter and produce data points
   % Produce points of an 3-D Helix
   if strcmp(lower(WhatData), 'helix'),
      t = [0:(pi/8):10*pi]';
      x = 5 * sin(t);
      y = 5 * cos(t);
      z = 2 * t;
      DataPoints = [x y z];
      Labels = [' hp '; 'hp2 '];


   % Produce points of another 3-D Helix
   elseif strcmp(lower(WhatData), 'helix2'),
      t = [0:0.3:7*pi]';
      x = 5 * sin(t);
      y = 5 * cos(t);
      z = 5 * sin(0.3 * t);
      DataPoints = [x y z];


   % Produce points of 2 circles with a large distance
   elseif strcmp(lower(WhatData), 'circles'),
      t = [0:(pi/20):4*pi-pi/10]';
      x = 2 * sin(t);
      y = 2 * cos(t);
      z = 100 * (~(t<2*pi));
      DataPoints = [x y z];
      
   % Produce points of 2 circles with a small distance
   elseif strcmp(lower(WhatData), 'circles2'),
      t = [0:(pi/10):4*pi-pi/10]';
      x = 2 * sin(t + pi/20 * (~(t<2*pi)));
      y = 2 * cos(t + pi/20 * (~(t<2*pi)));
      z = 10 * (~(t<2*pi));
      DataPoints = [x y z];

   
   % Produce points of 4 circles
   elseif strcmp(lower(WhatData), 'circles4'),
      t = [pi/40:(pi/15):8*pi]';
      x = 2 * sin(t);
      y = 2 * cos(t);
      z = 4 * ceil(t*4/t(length(t))) - 4;
      DataPoints = [x y z];

      
   % Produce points of ROSENBROOK's function objfun2/RASTRIGIN's objfun6
   elseif any(strcmp(lower(WhatData), {'objfun2', 'objfun6'})),
      OBJ_FUN = lower(WhatData);
      % Get the boundaries from the objective function (only 3 dimensional data)
      vlub = geaobjpara(OBJ_FUN, [1 3]);
      Datavar = initpop([], 200, vlub);
      DataObj = feval(OBJ_FUN, Datavar);
      DataPoints = [Datavar];


   % Produce points of the skulls test data
   elseif strcmp(lower(WhatData), 'skulls'),
      DataPoints = [ -2.27,-.781,-1.74,-1.33,-1.89,-.902,-1.48,-1.90,-1.41,-1.06,1.412,.4960
                     .0364,.3764,-.966,-.685,.3166,-.652,-.922,.1855,-.453,.4895,.2161,-1.12
                     -.707,1.557,-.327,.1476,-.418,-.401,1.124,.5110,.6635,-.800,1.718,.3807
                     .9280,1.439,-.675,-.096,1.261,.1838,1.557,1.357,2.577,.7475,.2161,-1.66
                     1.671,1.676,1.163,1.621,2.171,1.520,2.053,.4459,.9187,.2315,-.213,-.465
                     -.558,.8488,-1.93,-1.07,-.278,-1.40,-.364,-.856,-.293,1.263,1.074,-1.58
                     -1.45,.2583,-1.55,-1.01,-1.01,-1.15,-.488,-.596,-1.09,-.026,1.442,-.196
                     -.409,-.450,-1.45,-2.63,-1.05,-1.57,-1.11,-.596,-.772,-2.09,.0015,-1.20
                     -1.38,1.085,-.675,-.173,-.208,-.401,.8756,-1.77,-.453,-.284,1.994,.7268
                     -.558,-.096,-.579,-.173,-.313,-.401,-.116,.4459,-.134,.7475,.3694,-.081
                     .2593,-1.04,.1955,.1476,.3516,.1838,-.240,1.227,1.142,.7475,-.979,-.081
                     -.112,-2.06,-.772,.7241,-.733,-.067,-.612,-1.51,-1.41,.2315,-1.41,-.734
                     .5565,.7307,.4858,1.236,.8414,1.604,1.247,-1.25,-.772,.2315,.0322,-.081
                     -1.75,-1.04,-.579,-1.84,-1.75,-2.53,-2.35,-1.25,-.453,-1.32,.5839,1.265
                     -.409,1.203,-.966,.0836,-.068,-1.49,.8756,1.227,.6635,2.295,1.197,-.658
                     -1.87,-.923,-.385,-.493,-1.96,-1.15,-1.11,-1.12,-2.37,-.026,.9211,1.611
                     1.077,1.557,-.385,.2117,1.191,1.103,.3797,.4459,1.381,-.800,.1854,-1.50
                     .8537,.8488,.1955,-.557,.9464,.3091,-.364,-1.64,-.772,-.800,-.121,-.658
                     -.186,.0221,.9696,.3398,-.033,.3091,.1317,.7062,-.293,-.800,.1548,1.265
                     -1.15,.6126,-1.35,-1.07,-.558,-1.24,.2557,-.465,.6635,-1.06,1.442,-.311
                     1.002,1.321,1.744,1.749,1.261,1.771,2.115,-.596,-.453,.7475,.0935,.8037
                     -1.60,1.085,.0019,.1476,-1.36,-.735,-.116,.5761,.6635,.8764,2.209,1.765
                     .9280,.3764,.9696,1.365,.6665,.6015,.7516,-.205,-1.25,-1.06,-.520,.0731
                     .1850,.1402,.1955,-.813,-.488,-.150,-.488,.4459,1.142,-1.32,-.060,-.004
                     .4822,-2.22,.8342,-.045,-.488,-.234,-.860,.6411,1.302,-.284,-1.96,.3807
                     2.191,.4945,.9696,.2117,2.451,.8521,.5036,1.748,1.302,2.295,-1.38,-1.16
                     .0364,-.450,-1.16,-1.33,-.418,-.902,-.860,-.335,-.453,-.284,-.366,-1.31
                     -.261,-.686,1.647,1.236,-.313,.1838,.9995,-.856,-.612,-1.45,-.305,2.073
                     1.225,-1.04,-.385,.7241,.8414,1.103,-.116,1.097,.5838,-.026,-1.72,-1.66
                     .1850,-.923,-.385,-.557,-.208,.3091,-1.23,1.487,.1053,.2315,-.826,-.619
                     .3336,-.332,-.192,.2117,.0367,.1838,-.116,-.856,-.772,.7475,-.520,-.581
                     .0364,-.923,-.385,.0836,-.698,-.067,-.364,-.335,.5040,1.005,-.703,-.465
                     .7794,.0221,.9696,1.749,.7714,.9356,1.619,.7062,.8230,-1.83,-.642,.2269
                     .1850,.0221,.7761,-.429,.1067,.1002,-.116,.3157,-.214,-.542,-.152,.6499
                     1.077,-.521,.9696,1.493,.9114,1.144,.2557,.8364,-.772,1.005,-1.22,-.081
                     .1850,-.096,1.744,.7241,.1417,1.855,.5036,-.075,.5040,.6443,-.244,1.688
                     .0364,-.509,.3890,-1.33,-.908,.1002,-1.48,.7062,-.772,-.155,-.428,.3807
                     .1850,-1.75,.2922,.3398,.0717,-.150,-.488,-.856,-.772,-.026,-1.41,.1115
                     -1.00,-.805,.3890,.0836,-.628,-.150,-.860,-.075,.0255,.2315,.2468,1.496
                     1.225,.9669,1.937,.9803,1.436,1.395,.9995,2.008,1.780,1.263,-.336,.8037
                   ];

      Labels = ['  5F';
                '  7M';' 10F';' 13M';' 26M';' 32M';' 43F';' 45F';' 46F';' 52M';' 58F';' 59F';' 63F';' 64F';
                ' 66M';' 70F';' 83F';' 85M';' 86M';'93bM';' 96M';' 97F';' 99M';'102M';'112M';'120M';'121F';
                '125M';'136M';'137F';'138M';'139M';'140F';'143M';'144F';'145F';'146F';'148M';'151M';'152M';
               ];
               
               
               
   % Produce points of female skulls
   elseif strcmp(lower(WhatData), 'skulls_female')
       
       DataPoints = [-2.27 -0.781 -1.74 -1.33 -1.89 -0.902 -1.48 -1.9 -1.41 -1.06 1.412 0.496
                     -0.707 1.557 -0.327 0.1476 -0.418 -0.401 1.124 0.511 0.6635 -0.8 1.718 0.3807
                     -1.45 0.2583 -1.55 -1.01 -1.01 -1.15 -0.488 -0.596 -1.09 -0.026 1.442 -0.196
                     -0.409 -0.45 -1.45 -2.63 -1.05 -1.57 -1.11 -0.596 -0.772 -2.09 0.0015 -1.2
                     -1.38 1.085 -0.675 -0.173 -0.208 -0.401 0.8756 -1.77 -0.453 -0.284 1.994 0.7268
                     0.2593 -1.04 0.1955 0.1476 0.3516 0.1838 -0.24 1.227 1.142 0.7475 -0.979 -0.081
                     -0.112 -2.06 -0.772 0.7241 -0.733 -0.067 -0.612 -1.51 -1.41 0.2315 -1.41 -0.734
                     0.5565 0.7307 0.4858 1.236 0.8414 1.604 1.247 -1.25 -0.772 0.2315 0.0322 -0.081
                     -1.75 -1.04 -0.579 -1.84 -1.75 -2.53 -2.35 -1.25 -0.453 -1.32 0.5839 1.265
                     -1.87	-0.923 -0.385 -0.493 -1.96 -1.15 -1.11 -1.12 -2.37 -0.026 0.9211 1.611
                     1.077 1.557 -0.385 0.2117 1.191 1.103 0.3797 0.4459 1.381 -0.8 0.1854 -1.5
                     -1.6 1.085 0.0019 0.1476 -1.36 -0.735 -0.116 0.5761 0.6635 0.8764 2.209 1.765
                     0.0364 -0.45 -1.16 -1.33 -0.418 -0.902 -0.86 -0.335 -0.453 -0.284 -0.366 -1.31
                     0.185 -0.923 -0.385 -0.557 -0.208 0.3091 -1.23 1.487 0.1053 0.2315 -0.826 -0.619
                     0.7794 0.0221 0.9696 1.749 0.7714 0.9356 1.619 0.7062 0.823 -1.83 -0.642 0.2269
                     1.077 -0.521 0.9696 1.493 0.9114 1.144 0.2557 0.8364 -0.772 1.005 -1.22 -0.081
                     0.185 -0.096 1.744 0.7241 0.1417 1.855 0.5036 -0.075 0.504 0.6443 -0.244 1.688
                     0.0364 -0.509 0.389 -1.33 -0.908 0.1002 -1.48 0.7062 -0.772 -0.155 -0.428 0.3807
                    ];
                    
      Labels = ['  5F';' 10F';' 43F';' 45F';' 46F';' 58F';' 59F';' 63F';' 64F';' 70F';' 83F';' 97F';'121F';'137F';'140F';'144F';'145F';'146F'];

   % Produce points of male skulls
   elseif strcmp(lower(WhatData), 'skulls_male')
       
       DataPoints = [0.0364 0.3764 -0.966 -0.685 0.3166 -0.652 -0.922 0.1855 -0.453 0.4895 0.2161 -1.12
                     0.928 1.439 -0.675 -0.096 1.261 0.1838 1.557 1.357 2.577 0.7475 0.2161 -1.66
                     1.671 1.676 1.163 1.621 2.171 1.52 2.053 0.4459 0.9187 0.2315 -0.213 -0.465
                     -0.558 0.8488 -1.93 -1.07 -0.278 -1.4 -0.364 -0.856 -0.293 1.263 1.074 -1.58
                     -0.558 -0.096 -0.579 -0.173 -0.313 -0.401 -0.116 0.4459 -0.134 0.7475 0.3694 -0.081
                     -0.409 1.203 -0.966 0.0836 -0.068 -1.49 0.8756 1.227 0.6635 2.295 1.197 -0.658
                     0.8537 0.8488 0.1955 -0.557 0.9464 0.3091 -0.364 -1.64 -0.772 -0.8 -0.121 -0.658
                     -0.186 0.0221 0.9696 0.3398 -0.033 0.3091 0.1317 0.7062 -0.293 -0.8 0.1548 1.265
                     -1.15 0.6126 -1.35 -1.07 -0.558 -1.24 0.2557 -0.465 0.6635 -1.06 1.442 -0.311
                     1.002 1.321 1.744 1.749 1.261 1.771 2.115 -0.596 -0.453 0.7475 0.0935 0.8037
                     0.928 0.3764 0.9696 1.365 0.6665 0.6015 0.7516 -0.205 -1.25 -1.06 -0.52 0.0731
                     0.185 0.1402 0.1955 -0.813 -0.488 -0.15 -0.488 0.4459 1.142 -1.32 -0.06 -0.004
                     0.4822 -2.22 0.8342 -0.045 -0.488 -0.234 -0.86 0.6411 1.302 -0.284 -1.96 0.3807
                     2.191 0.4945 0.9696 0.2117 2.451 0.8521 0.5036 1.748 1.302 2.295 -1.38 -1.16
                     -0.261 -0.686 1.647 1.236 -0.313 0.1838 0.9995 -0.856 -0.612 -1.45 -0.305 2.073
                     1.225 -1.04 -0.385 0.7241 0.8414 1.103 -0.116 1.097 0.5838 -0.026 -1.72 -1.66
                     0.3336 -0.332 -0.192 0.2117 0.0367 0.1838 -0.116 -0.856 -0.772 0.7475 -0.52 -0.581
                     0.0364 -0.923 -0.385 0.0836 -0.698 -0.067 -0.364 -0.335 0.504 1.005 -0.703 -0.465
                     0.185 0.0221 0.7761 -0.429 0.1067 0.1002 -0.116 0.3157 -0.214 -0.542 -0.152 0.6499
                     0.185 -1.75 0.2922 0.3398 0.0717 -0.15 -0.488 -0.856 -0.772 -0.026 -1.41 0.1115
                     -1 -0.805 0.389 0.0836 -0.628 -0.15 -0.86 -0.075 0.0255 0.2315 0.2468 1.496
                     1.225 0.9669 1.937 0.9803 1.436 1.395 0.9995 2.008 1.78 1.263 -0.336 0.8037
                    ];
                     
      Labels = ['  7M';' 13M';' 26M';' 32M';' 52M';' 66M';' 85M';' 86M';'93bM';' 96M';' 99M';'102M';'112M';'120M';'125M';'136M';'138M';'139M';'143M';'148M';'151M';'152M'];
       

                
   % Produce points of the kellogs test data
   elseif strcmp(lower(WhatData), 'kellog'),
      DataPoints = [ .1818,.6000,.3333,.8125,.6429,.0000,.3333,1.0000,.9677,.0000  
                     .0000,.6000,.0000,.4375,1.0000,.0667,.0000,1.0000,1.0000,.0000
                     .5455,.2000,.0000,.3906,.0714,.2667,.9333,.5000,.0323,.0000   
                     .4545,.2000,.0000,.9063,.0714,.9333,.1333,.0000,.0484,.0000   
                     .5455,.0000,.0000,.2813,.0714,.4000,.8000,.5000,.0000,.0000   
                     .5455,.4000,1.0000,.4375,.2857,.2000,.4667,1.0000,.4516,.0000 
                     .5455,.2000,.0000,.6875,.0714,.9333,.2000,1.0000,.0323,.0000  
                     .5455,.2000,.3333,.3906,.0714,.2667,.8667,.5000,.0323,.0000   
                     .5455,.0000,.0000,.6250,.0714,.4667,.7333,.0000,.0161,.0000   
                     .4545,.4000,.0000,.0000,.2143,.4667,.4667,.5000,.2581,.0000   
                     .6364,.4000,.0000,.7500,.3571,.4667,.8000,1.0000,.5484,.0000  
                     .5455,.2000,.3333,.5313,.0714,.6667,.4000,1.0000,.1290,1.0000 
                     .8182,.4000,.3333,.5313,.1429,.8667,.6000,1.0000,.2419,1.0000 
                     1.0000,.4000,.6667,.4688,.2143,.6667,.8667,1.0000,.4516,.0000 
                     .6364,.2000,.3333,.5938,.0000,.5333,.6000,.5000,.0645,.0000   
                     .8182,.4000,.6667,.6875,.2143,.9333,.4667,1.0000,.3548,.0000  
                     .3636,.4000,.0000,.5313,.2143,.7333,.1333,1.0000,.2258,.0000  
                     .4545,.4000,.0000,1.0000,.0714,.8667,.2000,1.0000,.0806,1.0000
                     .6364,.4000,.3333,.6563,.3571,.4667,.8000,.5000,.7097,.0000   
                     .3636,.2000,.0000,.0000,.1429,.5333,.4000,1.0000,.2903,.0000  
                     .5455,.2000,.0000,.9063,.0000,1.0000,.2000,.0000,.0484,.0000  
                     .5455,.2000,.3333,.2188,.0714,.1333,1.0000,.5000,.0645,.0000  
                     .5455,1.0000,.0000,.7188,.0714,.6000,.2000,.0000,.1129,.0000  
                   ];

      Labels = ['AllB';'AllF';'AppJ';'CorF';'CorP';'Crac';'Cris';'Froo';'FroF';'FrMW';'FruB';'JRCN';
                'JRFN';'MuCB';'Nut&';'NGAR';'NutW';'Prod';'RaBr';'Rais';'RiKr';'Smac';'Spec';
               ];

   % Produce points of the ROSENBROCK function data
   elseif strcmp(lower(WhatData), 'f2good'),
      ResultDir = '';
      ResFileName = ['f2es1_4'];
      load([ResultDir ResFileName], 'ShowIndAll');
      % load f2_goodind_sel; DataPoints = F2Ind;
      DataPoints = ShowIndAll;
      FormatString = sprintf('%%%gg', fix(log10(size(DataPoints,1)+1)));
      Labels = num2str([1:size(DataPoints,1)]', FormatString);
      UsePoints = [1,5,10:10:50,70,100:50:500,600,700,800:200:min(2000,size(DataPoints,1)),min([2500,3000],size(DataPoints,1))];
      DataPoints = DataPoints(UsePoints,:);
      Labels = Labels(UsePoints,:);

      
   % If unknown option, issue a warning
   else              
      warning(sprintf('%s: Unknown option for data set. (%s)', mfilename, WhatData));
   end               
                     
                     
% End of function    
                     
                     
                     
                     
                     
                     
                     
                     
                     
                     
                     
                
                
                
                
                
                
                
                
                
                
                
                
                




GEATbx: Main page  Tutorial  Algorithms  M-functions  Parameter/Options  Example functions  www.geatbx.com 

This document is part of version 3.7 of the GEATbx: Genetic and Evolutionary Algorithm Toolbox for use with Matlab - www.geatbx.com.
The Genetic and Evolutionary Algorithm Toolbox is not public domain.
© 1994-2005 Hartmut Pohlheim, All Rights Reserved, (support@geatbx.com).