Predicting Mortality of ICU Patients: The PhysioNet/Computing in Cardiology Challenge 2012 1.0.0

File: <base>/sources/reko.kemppainen_at_gmail.com/entry8/plot_2d_change.m (1,925 bytes)
function plot_2d_change(data1,data2,DATA,IHD,ALL_CATEGORIES)

    num_params=size(data1,2);

    for param_idx=1:num_params
%         mean_all=MEAN_DATA_ALL(:,param_idx);
%         mean_1=MEAN_DATA_ALL(IHD==1,param_idx);
%         mean_0=MEAN_DATA_ALL(IHD==0,param_idx);
%         
%         
%         isnan1=sum(~isnan(MEAN_DATA_ALL(IHD==1,param_idx)))/(sum(IHD==1));
%         isnan0=sum(~isnan(MEAN_DATA_ALL(IHD==0,param_idx)))/(sum(IHD==0));
%         
%         M1 = mode(mean_1);
%         M0 = mode(mean_0);
        
%         figure(param_idx)
%         
%         subplot(1,3,1)
%         hist(mean_all)
%         title([ALL_CATEGORIES{param_idx} ' all'])
%         
%         
%         subplot(1,3,2)
%         hist(mean_1)   
%         title([ALL_CATEGORIES{param_idx} ' 1'])
%        
%         
%         subplot(1,3,3)
%         hist(mean_0)    
%         title([ALL_CATEGORIES{param_idx} ' 0'])
        
%         figure(param_idx+num_params+5)
%         hist(mean_1,20)
%         h = findobj(gca,'Type','patch');
%         set(h,'FaceColor','r','EdgeColor','w','facealpha',0.75)
%         hold on;
%         hist(mean_0,20)
%         h1 = findobj(gca,'Type','patch');
%         set(h1,'facealpha',0.75);
%         title([ALL_CATEGORIES{param_idx} ' mode0=' num2str(M0) '. '  ' mode1=' num2str(M1)]);
% 
%      
        
        figure(param_idx+num_params+5)
        
        
        scatter(data1(IHD==0,param_idx),data2(IHD==0,param_idx),'xr')
        hold on
        scatter(data1(IHD==1,param_idx),data2(IHD==1,param_idx),'ob')

        
        
  
        title([ALL_CATEGORIES{param_idx}]);

     
        
        
        
        
        
%         data = rand(1, 100);
% [N, X] = hist(data, 0:0.1:1);
% 
% subplot(2, 1, 1);
% hist(data, 0:0.1:1);
% 
% subplot(2, 1, 2);
% bar(X, N./sum(N), 1);
        
    end




end