Predicting Acute Hypotensive Episodes: The PhysioNet/Computing in Cardiology Challenge 2009 1.0.0

File: <base>/sources/Henriques/codeMatlab/mmNormalize.m (1,462 bytes)
% _________________________________________________________________________
% иииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииии
% PREDICTION OF ACUTE HYPOTENSIVE EPISODES USING NEURAL NETWORK MULTIMODELS
% _________________________________________________________________________
% иииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииии
%        Copyright (C) 2009
%          : Jorge Henriques ...  <jh@dei.uc.pt>,
%          : Teresa Rocha    ...  <teresa@sun.isec.pt>
%        This software is released under the terms of the GNU
%        General Public License (http://www.gnu.org/copyleft/gpl.html)
% иииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииии
% mmNormalise.m
%__________________________________________________________________________
% иииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииии
%  Data normalization
%__________________________________________________________________________
% иииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииииии


function [y, minX, maxX, bias]=mmNormalize(X, minV ,maxV, dbia, indK)


X=X(:);
X=X+dbia;
%========================== Range [minV..maxV]
maxX=max(X);
minX=min(X);
den=maxX-minX;

if maxX==minX
    y=X;
else
    y= minV + (maxV-minV)*(X-minX)/(maxX-minX);
end

if indK==0
    y=y(:);
    bias=0;
else
    y=y(:);
    bias=y(indK);
    y=y-bias;    
end