function [selected_featuredata] = test_cumulant_driver_swt(data,nmoment)
ndecomp = 4;
% SWT
    wdata = swt(data,ndecomp,'db5');    
    n = 1;
    data = wdata(n,:);
    cum = cumulants(data,nmoment);
    featuredata = cum;
    n = 2;    
    while(n <= ndecomp+1)        
        data = wdata(n,:);         
        cum = cumulants(data,nmoment);    
        featuredata(n,:) = cum;  
        n = n+1;
    end 
    a= 1;
    while(a < nmoment)
        selected_featuredata1(:,a) = featuredata(:,a+1); 
        a = a + 1;
    end    %moments are returned starting from second moment. 
    selected_featuredata = selected_featuredata1;
end

% % DWT
%     [cA1,cD1] = dwt(data,'db5');  
%     dummy = cA1;
%     n = 1;
%     cum = cumulants(cD1,nmoment);
%     featuredata = cum;
%     n = 2;    
%     while(n <= ndecomp)       
%         [cA,cD] = dwt(dummy,'db5'); 
%         dummy = cA;
%         cum = kurtosis(cD);
% %         cum = cumulants(cD,nmoment);    
%         featuredata(n,:) = cum;  
%         n = n+1;
%     end 
%     cum = kurtosis(cA);
% %     cum = cumulants(cA,nmoment);    
%     featuredata(n,:) = cum;    
%     a= 1;
%     while(a < nmoment)
%         selected_featuredata1(:,a) = featuredata(:,a+1); 
%         a = a + 1;
%     end    %moments are returned starting from second moment. 
%     selected_featuredata = selected_featuredata1;
% end

% %WPT
%     wdata = wpdec(data,ndecomp,'db5');
%     n = 0;
%     i = 1;    
%     index = 1;
%     while(i<=ndecomp)
%         while(n < 2^i)
%             data = wpcoef(wdata,[i,n]);
%             cum = cumulants(data,nmoment);    
%             featuredata(index,:) = cum;
%             index = index+1;
%             n = n+1;
%         end
%         n = 0;
%         i = i+1;
%     end
%     a= 1;
%     while(a < nmoment)
%         selected_featuredata1(:,a) = featuredata(:,a+1); 
%         a = a + 1;
%     end    %moments are returned starting from second moment. 
%     selected_featuredata = selected_featuredata1;
% end