0 Posted 2020-05-01Updated 2024-01-11Ra minute read (About 183 words)Data normalizationData normalization Normalization 1 Max-Min for(ii in 1:ncol(a)){a[,ii] <- (a[,ii]-min(a[,ii]))/(max(a[,ii])-min(a[,ii]))} 2 z-score for(ii in 1:ncol(a)){a[,ii] <- (a[,ii]-mean(a[,ii]))/sd(a[,ii])} 3 Soft-max_Normalization for(ii in 1:ncol(a)){a[,ii] <- pnorm((a[,ii]-mean(a[,ii]))/sd(a[,ii]))} 4 Logistic/Softmax for(ii in 1:ncol(a)){a[,ii] <- 1/(1+ exp(-a[,ii])) 5 模糊量化模式 for(ii in 1:ncol(a)){x<- a[,ii]a[,ii] <- x <- 1/2 +1/2sin(pi/(max(x)-mean(x))(x-max(x)-mean(x)/2)) *x} 6 log for(ii in 1:ncol(a)){a[,ii][which(a[,ii]>0)] <- log(a[,ii][which(a[,ii]>0)],10)/log(max(a[,ii]),10)a[,ii][which(a[,ii]<0)] <- log(a[,ii][which(a[,ii]<0)](-1),10)(-1)/log(mean(a[,ii]) *(-1))} 7 atan for(ii in 1:ncol(a)){a[,ii][which(a[,ii]>0)] <- atan(a[,ii][which(a[,ii]>0)])*2/pia[,ii][which(a[,ii]<0)] <- atan(a[,ii][which(a[,ii]<0)])2/pi (-1)} 8 Logistic/Softmax ## Something wrong with this 1/2+ 1/2sim(pi/max()) Data normalizationhttps://karobben.github.io/2020/05/01/R/Data-normalization/AuthorKarobbenPosted on2020-05-01Updated on2024-01-11Licensed under#RStatistic