1 %> @brief Image map
for non-ordered, discrete features (e.g. from clustering)
3 %> @sa uip_vis_image_cat.m
6 %> =0. 0: feature; 1:
class
8 %> =1. Index of feature in
case @c mode is 0.
10 %> Whether to stretch the image to occupy the whole figure area
11 flag_set_position = 1;
12 % Minimum number of points per category
14 % Maximum num,ber of categories
20 o.classtitle = 'Image map - Cluster data';
25 methods(Access=protected)
27 function Z = get_Z(o, data)
29 Z = data.X(:, o.idx_fea)';
31 error('Not implemented for "class" mode yet, sorry');
33 irerror(sprintf('Invalid mode: %d', o.mode));
38 function data = implement_min_ppc(o, data)
43 counts = diff(find([1, diff(sort(Z)), 1])); % Finds how many times each number appears
45 idxs = find(counts < o.min_ppc);
47 % feanew = numel(counts)-numel(idxs)+1;
48 feanew = 2*(numel(counts)-numel(idxs));
55 ZZ(Z == nums(idxs(i))) = feanew; %1;
58 data.X(:, o.idx_fea) = ZZ';
67 function out = do_use(o, obj)
69 if isempty(obj.height) || obj.height < 1
70 irerror('Dataset has no defined image dimensions!');
73 % Makes a dataset sorted by number of occurences in the last column
75 Z = obj.X(:, o.idx_fea);
79 classlabels = obj.classlabels;
81 irerror(sprintf('Invalid mode: %d', o.mode));
89 if o.flag_set_position
90 set(gca, 'Position', [0, 0, 1, 1]);
Dataset class - cluster data.
Visualization base class.
function renumber_vector_idooo(in y)
function set_title(in s, in obj)
function draw_indexedimage(in Y, in height, in direction, in classlabels)
Image map for non-ordered, discrete features (e.g. from clustering)