1 function matrix = hp_plot_domain_full(hp_model)
2 tree = set_color(hp_model.tree);
5 matrix=zeros(detail,detail,3);
10 c= getcolor(tree,[i/detail;n/detail;]);
16 imagesc(0:1,0:1,matrix);
18 function c=getcolor(tree,param)
20 % if the given tree is a tree (and not an array)
22 %get representative parameters of the two sub-trees
23 first_l=tree_first(tree{1});
24 first_r=tree_first(tree{2});
25 % calculate the distances
for tree navigation
using the
27 if hp_model.error_distance_extionsion ==1
29 distance_l = hp_model.distance_function(first_l.model,first_l.anchor,param,...
30 first_l.detailed_data,first_l.reduced_data);%norm(first_l-param,2);
31 distance_r = hp_model.distance_function(first_r.model, first_r.anchor,param,...
32 first_r.detailed_data,first_r.reduced_data) ;%norm(first_r-param,2);
36 distance_l = hp_model.distance_function(first_l.model,first_l.anchor,param);%norm(first_l-param,2);
37 distance_r = hp_model.distance_function(first_r.model, first_r.anchor,param);%norm(first_r-param,2);
40 % decide which subtree to follow and start recursion
41 if distance_l<distance_r
42 c = getcolor(tree{1},param);
44 c =getcolor(tree{2},param);
46 %
if the given tree is a array (algorithem arrived at the searched domain)
53 function value= tree_first (test)
56 value=tree_first(test{1});
63 function tree_out = set_color( tree )
64 %
function hp_plot_domains( tree )
65 % Funktion zum Zeichnen von Trainigsgebieten vom hp Bäumen (Bei 2d parameter)
67 % Naviagation durch den gesammten Baum
69 tree{1}=set_color(tree{1});
70 tree{2}=set_color(tree{2});
73 %Ausgabe des Traingssets in zufälliger Farbe
76 tree_out.color =rand_uniform(3,{[0.5 1]});