Skip to content
Permalink
242615d4ba
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
15 lines (15 sloc) 664 Bytes
%%______________________________________________________________________________
%% This function is to pre-process the datasets
%% Method 1: normalize to standard normal distribution; Method 2: scale to [0 1]
%% This function is created by Kai Zhou 7/31/2019
%%______________________________________________________________________________
function [DataobjT,para1,para2] = DataPreProcess(Dataobj,dataProcessMethod)
if dataProcessMethod == 1
para1 = mean(Dataobj);
para2 = std(Dataobj);
DataobjT = (Dataobj-para1)/para2;
else
para1 = min(Dataobj(:));
para2 = max(Dataobj(:));
DataobjT = (Dataobj - para1)/(para2-para1);
end