回归分析中的评价方法

article/2025/7/18 10:32:11
 

 回归(Regression)不同于分类问题,在回归方法中我们预测一系列连续的值,在预测完后有个问题是如何评价预测的结果好坏,关于这个问题目前学术界也没有统一的标准。下面是我在论文中的看到的一些常用方法,希望对有缘人有用。

1 MAE(Mean Absolute Error)平均绝对差值

In statistics, the mean absolute error (MAE) is a quantity used to measure how close forecasts or predictions are to the eventual outcomes. The mean absolute error is given by

\mathrm{MAE} = \frac{1}{n}\sum_{i=1}^n \left| f_i-y_i\right| =\frac{1}{n}\sum_{i=1}^n \left| e_i \right|.

As the name suggests, the mean absolute error is an average of the absolute errors e_i = |f_i - y_i|, where f_i is the prediction and y_i the true value. Note that alternative formulations may include relative frequencies as weight factors.

注意:MAE与 MAD(Mean Absolute Difference)等价。此外,MAE很容易跟absolute deviation(绝对偏差)混淆,它们的定义很类似,但使用的场景完全不同;绝对偏差针对的就是一组数据,而MAD针对的两组数据(预测值一组,真实值一组)。

2 MSE(Mean Square Error)均方误差

If \hat{Y} is a vector of n predictions, and Y is the vector of the true values, then the (estimated) MSE of the predictor is: \operatorname{MSE}=\frac{1}{n}\sum_{i=1}^n(\hat{Y_i} - Y_i)^2.

3 RMSE(Root Mean Square error)均方根误差

RMSE跟RMSD(Root-mean-square deviation)均方根偏差的定义等价,RMSE实际上就是MSE的平方根。

The RMSD of an estimator \hat{\theta} with respect to an estimated parameter \theta is defined as the square root of the mean square error:

\operatorname{RMSD}(\hat{\theta}) = \sqrt{\operatorname{MSE}(\hat{\theta})} = \sqrt{\operatorname{E}((\hat{\theta}-\theta)^2)}.

For an unbiased estimator, the RMSD is the square root of the variance, known as the standard error.

The RMSD of predicted values \hat y_t for times t of a regression's dependent variable y is computed for n different predictions as the square root of the mean of the squares of the deviations:

\operatorname{RMSD}=\sqrt{\frac{\sum_{t=1}^n (\hat y_t - y_t)^2}{n}}.

In some disciplines, the RMSD is used to compare differences between two things that may vary, neither of which is accepted as the "standard". For example, when measuring the average difference between two time series x_{1,t} and x_{2,t}, the formula becomes

\operatorname{RMSD}= \sqrt{\frac{\sum_{t=1}^n (x_{1,t} - x_{2,t})^2}{n}}. 


4 Normalized root-mean-square deviation归一化均方差跟偏差

The normalized root-mean-square deviation or error (NRMSD or NRMSE) is the RMSD divided by the range of observed values of a variable being predicted,or:

\mathrm{NRMSD} = \frac{\mathrm{RMSD}}{y_\max -y_\min}

The value is often expressed as a percentage, where lower values indicate less residual variance.

 coefficient of variation of the RMSD

The coefficient of variation of the RMSD, CV(RMSD), or more commonly CV(RMSE), is defined as the RMSD normalized to the mean of the observed values:

 \mathrm{CV(RMSD)} = \frac {\mathrm{RMSD}}{\bar y}.

It is the same concept as the coefficient of variation except that RMSD replaces the standard deviation.

-------------------------------------------------------------------------------------------------------------------------------------------

Correlation Coefficient(相关系数)

        相关表和相关图可反映两个变量之间的相互关系及其相关方向,但无法确切地表明两个变量之间相关的程度。于是,著名统计学家卡尔·皮尔逊设计了统计指标——相关系数(Correlation coefficient)。相关系数是用以反映变量之间相关关系密切程度的统计指标。相关系数是按积差方法计算,同样以两变量与各自平均值的离差为基础,通过两个离差相乘来反映两变量之间相关程度;着重研究线性的单相关系数。

       依据相关现象之间的不同特征,其统计指标的名称有所不同。如将反映两变量间线性相关关系的统计指标称为相关系数(相关系数的平方称为判定系数);将反映两变量间曲线相关关系的统计指标称为非线性相关系数、非线性判定系数;将反映多元线性相关关系的统计指标称为复相关系数、复判定系数等。

       相关关系是一种非确定性的关系,相关系数是研究变量之间线性相关程度的量。由于研究对象的不同,相关系数有如下几种定义方式:

简单相关系数:又叫相关系数或线性相关系数,一般用字母P 表示,用来度量两个变量间的线性关系。
复相关系数:又叫多重相关系数。复相关是指因变量与多个自变量之间的相关关系。例如,某种商品的季节性需求量与其价格水平、职工收入水平等现象之间呈现复相关关系。
典型相关系数:是先对原来各组变量进行主成分分析,得到新的线性关系的综合指标,再通过综合指标之间的线性相关系数来研究原各组变量间相关关系。
下面是两种在回归分析评价中常用的相关系数。
-------------------------------------------------------------------------------------------------------------------------------------

6  Pearson's Correlation Coefficient(皮尔逊相关系数)

  有的论文里叫COR(相关性)

相关系数:考察两个事物(在数据里我们称之为变量)之间的相关程度。

如果有两个变量:X、Y,最终计算出的相关系数的含义可以有如下理解:

(1)、当相关系数为0时,X和Y两变量无关系。

(2)、当X的值增大(减小),Y值增大(减小),两个变量为正相关,相关系数在0.00与1.00之间。

(3)、当X的值增大(减小),Y值减小(增大),两个变量为负相关,相关系数在-1.00与0.00之间。

相关系数的绝对值越大,相关性越强,相关系数越接近于1或-1,相关度越强,相关系数越接近于0,相关度越弱。

通常情况下通过以下取值范围判断变量的相关强度:
相关系数     0.8-1.0     极强相关
                 0.6-0.8     强相关
                 0.4-0.6     中等程度相关
                 0.2-0.4     弱相关
                 0.0-0.2     极弱相关或无相关

皮尔逊相关也称为积差相关(或积矩相关)是英国统计学家皮尔逊于20世纪提出的一种计算直线相关的方法。

假设有两个变量X、Y,那么两变量间的皮尔逊相关系数可通过以下公式计算:

公式一:

皮尔逊相关系数计算公式

公式二:

皮尔逊相关系数计算公式

公式三:

皮尔逊相关系数计算公式

公式四:

皮尔逊相关系数计算公式

以上列出的四个公式等价,其中E是数学期望,cov表示协方差,N表示变量取值的个数。

注意当两个变量的标准差都不为零时,相关系数才有定义,皮尔逊相关系数适用于:

(1)、两个变量之间是线性关系,都是连续数据。

(2)、两个变量的总体是正态分布,或接近正态的单峰分布。

(3)、两个变量的观测值是成对的,每对观测值之间相互独立。

7 concordance correlation coefficient(一致性相关系数)

In statistics, the concordance correlation coefficient measures the agreement between two variables, e.g., to evaluate reproducibility or for inter-rater reliability.

Definition:

Lawrence Lin has the form of the concordance correlation coefficient \rho_c as

\rho_c = \frac{2\rho\sigma_x\sigma_y}{\sigma_x^2 + \sigma_y^2 + (\mu_x - \mu_y)^2},

where \mu_x and \mu_y are the means for the two variables and \sigma^2_x and \sigma^2_y are the corresponding variances. \rho is the correlation coefficient between the two variables.

This follows from its definition[1] as

\rho_c = 1 - \frac{​{\rm Expected\ orthogonal\ squared\ distance\ from\ the\ diagonal\ }x=y}{​{\rm Expected\ orthogonal\ squared\ distance\ from\ the\ diagonal\ }x=y{\rm \ assuming\ independence}}.

When the concordance correlation coefficient is computed on a N-length data set (i.e., two vectors of length N) the form is

\hat{\rho}_c = \frac{2 s_{xy}}{s_x^2 + s_y^2 + (\bar{x} - \bar{y})^2},

where the mean is computed as

\bar{x} = \frac{1}{N} \sum_{n=1}^N x_n

and the variance

s_x^2 = \frac{1}{N} \sum_{n=1}^N (x_n - \bar{x})^2

and the covariance

s_{xy} = \frac{1}{N} \sum_{n=1}^N (x_n - \bar{x})(y_n - \bar{y}) .

Whereas the ordinary correlation coefficient (Pearson's) is immune to whether the biased or unbiased versions for estimation of the variance is used, the concordance correlation coefficient is not. In the original article Lin suggested the 1/N normalization, while in another article Nickerson appears to have used the 1/(N-1), i.e., the concordance correlation coefficient may be computed slightly differently between implementations.

Relation to other measures of correlation

The concordance correlation coefficient is nearly identical to some of the measures called intra-class correlations, and comparisons of the concordance correlation coefficient with an "ordinary" intraclass correlation on different data sets found only small differences between the two correlations, in one case on the third decimal. It has also been stated that the ideas for concordance correlation coefficient "are quite similar to results already published by Krippendorff in 1970".

In the original article[1] Lin suggested a form for multiple classes (not just 2). Over ten years later a correction to this form was issued.

One example of the use of the concordance correlation coefficient is in a comparison of analysis method for functional magnetic resonance imaging brain scans.

  

Reference:

http://en.wikipedia.org/wiki/Concordance_correlation_coefficient

http://en.wikipedia.org/wiki/Correlation_coefficient

http://en.wikipedia.org/wiki/Root_mean_square_error

http://blog.csdn.net/wsywl/article/details/5727327


转载自:http://blog.csdn.net/computerme/article/details/38871467


http://chatgpt.dhexx.cn/article/T1KN5T42.shtml

相关文章

AMBER分子动力学简例

AMBER分子动力学简例(一) 概述 以下是使用AMBER包的简单教程,希望对开始学习分子动力学的同学有用处。申明一下,以下教程原版来自网上,是最最基本的教程,同时也非常实用,有非常好的借鉴意义。…

【学习笔记】山东大学生物信息学-04 蛋白质结构预测与分析

课程地址:山东大学生物信息学 文章目录 四、蛋白质结构预测与分析4.1 蛋白质的二级结构4.2 蛋白质的三级结构4.3 三级结构可视化软件 VMD4.4 计算方法预测三级结构4.5 三级结构的比对4.6 蛋白质分子表面性质4.7 获取蛋白质四级结构4.8 蛋白质-蛋白质分子对接4.9 蛋白…

Docking非原生配体

转载于 https://mp.weixin.qq.com/s/VDN1qAZGIMol6prwQW4umw Docking非原生配体 在前面的例子中,AutoDock Vina能把配体构象调整到几乎原生的构象,验证了这一预测方法的准确度。下面,我们尝试docking另外一个配体药物nelfinavir奈非那韦&…

AutoDockFR:具有明确指定结合位点灵活性的蛋白质-配体对接研究进展

微信公众号参考链接:链接 引用原文:Ravindranath, Pradeep Anand et al. “AutoDockFR: Advances in Protein-Ligand Docking with Explicitly Specified Binding Site Flexibility.” PLoS computational biology vol. 11,12 e1004586. 2 Dec. 2015, doi:10.1371/j…

CADD之分子对接二:简单autodockvina对接流程——redocking

1、需要软件:autodocktools,vina,pymol pymol使用教程(包含安装):基础教程 — PyMOL中文教程 2022.09 文档 autodocktools及vina安装包: 「autodocktools」https://www.aliyundrive.com/s/88pQFmFBNKK 点击链接保存…

对分子模拟轨迹数据的分析绘图

简介 建立模型进行分子动力学模拟后,对得到的轨迹进行主成分分析(PCA),绘制相关性矩阵(Correlation Matrix)和自由能井图(Free Energy Landscape)和dssp图(Definition …

【学习笔记】ICLR2022-GNNRefine

一、代码Run 1. 运行 python /home/huangjiehui/Project/AIProtein/StructuralReconstruction/RefineGNN/ab_train.py --cdr_type 3 --train_path /home/huangjiehui/Project/AIProtein/StructuralReconstruction/RefineGNN/data/sabdab/hcdr3_cluster/train_data.jsonl --va…

利用pymol批量对PDB文件三维结构比对并输出RMSD值

经验上、文献上大量的蛋白质或者核酸比对工作是从一级序列开始的,这是基于一级序列决定二级结构,二级结构决定三级结构,而且一级序列有30%的相似性,那么两者的结构就具有较高的相似性这样的共识理论而来,这些理论也是基…

AMBER:使用Cpptraj计算RMSD 以及使用中遇到的问题

记录笨比生活又一天 输入文件rms.in设置运行cpptraj遇到的问题1.cpptraj不输出结果2.空格的问题 Tofirst:[空格]1-249&!H firstTofirst[空格]:1-249&!H first 输入文件rms.in设置 parm XXXXX.prmtop #载入拓扑文件 trajin XXXX_prod.nc #载入轨迹文件 rms ToFirst …

分子动力学模拟Amber/Gromacs结合自由能计算 药效团模型构建RMSD、RMSF

文章来源:公众号“科研讨论圈” 以下是使用AMBER、GROMAVCS的教程,希望对开始学习分子动力学的同学有帮助。 分子动力学入门理/论 分子力学简介 分子…

RMSD:通过旋转计算两个分子间的最小rmsd

使用旋转计算两个分子的均方根偏差(RMSD) 使用Kabsch算法(1976)或Quaternion算法(1991)进行旋转,在两个笛卡尔坐标之间.xyz或者.pdb格式中计算均方根偏差(RMSD)&#xf…

PSP - TMScore(US-align)、RMSD、Sequence 源码

欢迎关注我的CSDN:https://spike.blog.csdn.net/ 本文地址:https://blog.csdn.net/caroline_wendy/article/details/129125467 参考文档:Nature Methods | 蛋白、RNA、DNA及其复合物结构的比对算法US-align 官网地址:https://zha…

基于Gromacs的蛋白分子动力学模拟(RMSD、RMSF及蛋白的回旋半径)

一、实验要求 实验对象:目标体系为modeller或其他方法建模的结果中评价最好的模型。 软件: Gromacs-5.1.2 二、实验步骤 加立场 gmx pdb2gmx –h 打开帮助菜单。 选力场的时候选择 Amber99sb…,溶剂类型选Tip3p。 2、加模拟盒子,溶剂层…

RMSD与PMSF 解释与区别

我不需要力量源泉 对我来说 这只是需要完成的一件事,我应该一直全力以赴的做下去 放弃不是我的天性,我甚至不在乎乐观还是悲观。 二者都是对位移的平方和再求平方根,最后求得均值。区别在于:RMSD为在同一帧情况下,对不…

pymol pymol-align两分子或蛋白距离误差计算RMSD;spyrmsd库计算RMSD

参考:https://zhuanlan.zhihu.com/p/347743101 https://www.codenong.com/cs106148400/ RMSD 单位是埃 RMSD,root-mean-square deviation,也就是均方根偏差。 原子位置的均方根偏差是叠加蛋白质的原子(通常是骨架原子)之间的平均…

RMSD和RMSF

RMSD,Root Mean Square Deviation,均方根偏差;RMSF,Root Mean Square Fluctuation,均方根波动。 在轨迹分析中,最经常用,最简单,也最有用的就是这两巨头,二者都是对位移的…

统计学常用指标

目录 标准差(SD)均方根误差(RMSE/RMSD)均方误差(MSE/MSD)平均绝对误差(MAE)决定系数/拟合优度(R^2)平均偏差(Bias) 标准差(SD) 标准差(StandardDeviation),在概率统计中最常使用作为统计分布程度(statisticaldispersion&#xff…

Excel如何查找批注

Excel查找的选项,查找范围选择批注就可以了

Excel 打印显示批注(亲自实践)

有时候需要将Excel中的批注,随同正文一起打印出来 方法如下: 1.右键有批注的单元格,选择"显示/隐藏批注" 2.选择"分页预览"模式显示工作表 3.右键任意单元格,选择"页面设置" 4.在"页面设置"窗口中,标签"工作表"的&quo…

excel中深入理解批注

excel中深入理解批注 系统要求一、单个批注二、所有批注三、形状修改四、插入图 系统要求 装有office2010以上版本功能:批注 一、单个批注 右击显示或隐藏批注 显示表示批注不退出(鼠标移开时) 二、所有批注 审阅显示或隐藏批注 三、…