preprocessing.m

% -------------------------------------------------------------------------
% Function: out=preprocessing(X,method)
% -------------------------------------------------------------------------
% Aim:
% Data preprocessing
% ------------------------------------------------------------------------
% Input: 
% X, matrix (n,p), predictor matrix 
% method, string defining type of data preprocessing
% 
% classical preprocessing:
% 'mean centering' - columnwise cenetering of X
% 'standardisation' - columnwise standardisation of X
% 'SNV' - Standard Normal Variate
%
% robust preprocessing:
% 'median centering' - columnwise cenetering of X with classical median
% 'l1-median centering' - columnwise cenetering of X with L1-median
% 'qn-standardisation' - columnwise standardisation of X with Qn-estimator
% 'qn-autoscaling' - autoscaling by centering around L1-median and Qn
% standardisation
% 'sn-standardisation' - columnwise standardisation of X with Sn-estimator
% 'sn-autoscaling' - autoscaling by centering around L1-median and Sn
% standardisation
% 'mad' - columnwise Median of Absolute Deviation
% 'median-snv' - Standard Normal Variate with classical median
% 'sn-snv' - Standard Normal Variate with Qn-estimator
% 'sn-snv' - Standard Normal Variate with Sn-estimator
% ------------------------------------------------------------------------
% Output:
% out, preprocessed X
% -----------------------------------------------------------------------
% Example: 
% out=preprocessing(X,'mean centering')
Valid CSS! Valid HTML 4.01!