gmgitx / BLOG_natural_science

精于勤,荒于嬉;行成于思,毁于随。 韩愈
GNU General Public License v3.0
0 stars 0 forks source link

PCA研习.md #29

Open gmgitx opened 5 years ago

gmgitx commented 5 years ago

29

gmgitx commented 5 years ago

Best Way To Quantify Influence Of Different Covariates On Gene Expression

数值的量度重要则是选择原始数据或log转换

数值的变化重要则是选择scale

标准化问题

http://sofasofa.io/forum_main_post.php?postid=1000375 #PCA降维之前为什么要先标准化?

如果变量之间的数据的处于不同数量级或者变量之间的均值/方差相差很大时,建议是进行标准化的,PCA降维之前为什么要先标准化

常见的用scale()函数,输入矩阵,以列(列名是变量)进行标准化 #太棒啦!!!

https://www.jianshu.com/p/ae9db78ebb0f

Rows are samples and columns are variables

install.packages("factoextra",repos="http://mirror.bjtu.edu.cn/")

好用的参考:

  1. FactoMineR and factoextra : Principal Component Analysis Visualization - R software and data mining

  2. Gene Expression Normalization Workflowpvca

非常简单而又非常完整的R语言主成分分析实例

summary(student.pr, loadings = T)

主成分分析的计算步骤:

  假设样本观测数据矩阵为:
  X=(x1,x2,x3,...xp),xi为n个样本在第i个属性上的观测值,是一个列向量
 1.对原始数据标准化处理(0均值化处理)
 2.计算样本相关系数矩阵
 3.计算协方差矩阵的特征值和特征向量
 4.选择重要的主成分,并写出主成分表达式
 5.计算主成分得分
 6.根据主成分得分的数据,做进一步的统计分析。