前端开发入门到精通的在线学习网站

网站首页 > 资源文章 正文

矩阵的标准化以及归一化

qiguaw 2024-11-20 20:34:59 资源文章 12 ℃ 0 评论



小编前面已经对矩阵的正向化做了详细地讲解,今天给大家带来的是TOPSIS过程中矩阵的标准化以及归一化。

The editor has already explained the normalization of the matrix in detail, and today I bring you the standardization and normalization of the matrix in the TOPSIS process.

1.标准化

标准化的目的是消除不同指标量纲的影响,标准化的方法有很多种,这里我们采用的是前人的论文中用的比较多的一种标准化方法。

The purpose of standardization is to eliminate the influence of different index dimensions. There are many standardization methods. Here we use a standardization method that is more used in previous papers.


简单地说就是:

Simply put:

正向化后的矩阵:

Matrix after normalization:

代码实现:

Code:

标准化输出结果:

Standardized output results:

知识拓展:

repmat函数用于处理大矩阵且内容有重复的情况,其功能是以A的内容堆叠在(M×N)的矩阵B中。

例子:

The repmat function is used to process large matrices and the content is repeated. Its function is to stack the content of A in (MxN) matrix B.

For example:




2,归一化

矩阵的标准化完成后需要进行归一化,将得分归一化后可限制在0-1这个区间,对于区间内的每一个得分,我们很容易得到其所处的比例位置。

归一化步骤:

After the standardization of the matrix is completed, it needs to be normalized. After the score is normalized, it can be limited to the interval of 0-1. For each score in the interval, we can easily get its proportional position.

Normalization steps:


代码实现:

Code:


归一化后的得分:

Normalized score:


知识扩展:

sort函数形式:

sort(A):A为向量时,对A的各元素升序排列;A为矩阵时,默认对A的各列进行升序排列。

sort(A,dim):dim=1时等效于sort(A);dim=2时对各行元素升序排列。

sort(A,dim,mode):mode为'ascend'时,进行升序排序;mode为'descend'时,进行降序排序。

例子:

The sort function form:

sort(A): When A is a vector, the elements of A are sorted in ascending order; when A is a matrix, the columns of A are sorted in ascending order by default.

sort(A,dim): when dim=1 is equivalent to sort(A); when dim=2, arrange the elements in ascending order.

sort(A,dim,mode): When mode is'ascend', sort in ascending order; when mode is'descend', sort in descending order.

For example:

index函数为各元素在原向量中的位置索引。

例子:

The index function is the position index of each element in the original vector.

For example:

下期小编将对MATLAB实现TOPSIS的整个过程进行梳理以及模型扩展,记得及时关注哦!

In the next issue, the editor will sort out the entire process of MATLAB's implementation of TOPSIS and expand the model. Remember to pay

attention in time!

参考资料:谷歌翻译、CSDN

本文由LearningYard原创,如有侵权请联系删除




Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表