Find variable features
pbmcX <- FindVariableFeatures(pbmcX, selection.method = "vst", nfeatures = 2000)
vst: First, fits a line to the relationship of log(variance) and log(mean) using local polynomial regression (loess). Then standardizes the feature values using the observed mean and expected variance (given by the fitted line) [Z-score or scaled]. Feature variance is then calculated on the standardized values after clipping to a maximum (see clip.max parameter).
##c1=(1,2,3,4,5); c2=c(100,200,300,400,500); 平均数越大,对应的标准差计算也会越大,但是并不代表基因变异最大;假设 sd~means (符合多态分布);
for an observed mean M(o) and sd(o), obtain expected sd(e) ;
C1 = scale(c1,mean=M(o),sd=sd(o)) ##var(C1)=1;
C1# = scale(c1,mean=M(o),sd=sd(e))
if sd(e)>sd(o); var(C1#) <1 (var(C1)); ##意味这c1 的变异小
if sd(e)<sd(o); var(C1#) >1 (var(C1)); ##意味着c1的变异大