Matrices Modeling Contexts
引入
8:02
含参数、向量与矩阵的函数
看这个过山车。在任意时刻,车厢都有两个事实:它在哪里,以及它朝哪个方向运动。单一方程无法同时容纳两者。这颗星球运行的……
英文讲解 · 可切换中英文字幕
本课内容
| English | 释义 | 拼音 |
|---|---|---|
| matrix/ˈmeɪtrɪks/ | 矩阵 | jǔ zhèn |
| state vector/steɪt ˈvektə/ | 状态向量 | zhuàng tài xiàng liàng |
| state/steɪt/ | 状态 | zhuàng tài |
| transition matrix/trænˈsɪʃn ˈmeɪtrɪks/ | 转移矩阵 | zhuǎn yí jǔ zhèn |
用矩阵预测未来
- 每年,有些人从城市搬到郊区,也有些人搬回城市。
- 给定今年的人口,你能预测明年的人口吗?
- 矩阵可以储存流动率,替你做出预测。
- 这就是矩阵为人口、市场、天气等建模的方式。
状态向量:当前的画面
- 把当前的数量收进一个状态向量(state vector)——每个类别一个元素。
- 对一座城市和它的郊区:$\begin{bmatrix}\text{city}\\ \text{suburb}\end{bmatrix}$,比如 $\langle 600, 400\rangle$(千人)。
- 每个状态(state)是被追踪的一样东西;这个向量是某个时刻的快照。
- 明年的快照将是一个新的状态向量。
A state vector in this kind of model holds…
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
A state vector lists how much is in each category right now — one entry per state.
转移矩阵:规则
- 转移矩阵(transition matrix)储存每一对状态之间流动的比例。
- 每个数是一个率:例如每年 $5\%$ 的城市居民搬到郊区。
- 下面的图显示两个状态,箭头上标着流动率。
- 那些相同的率就成为矩阵的元素。


The matrix that stores the rates of movement between states is called the ____ matrix.
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
The transition matrix holds the fraction moving from each state to each other state.
Multiplying the transition matrix by the current state vector gives the previous state.
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
False. One matrix-times-vector step advances the model by one period, predicting the next state.
在时间上向前一步
- 把转移矩阵乘以当前的状态向量,得到明年的。
- 一次"矩阵乘向量" = 向前一年。
- 想要两年?再乘一次。十年?乘十次。
- 模型向前行进,每次相乘一步。
A good use of a matrix?
Matrices model transformations, systems and transitions. Sort each task.
To predict the state 二 periods ahead, you…
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
Each multiplication advances one period, so two periods need two multiplications (or multiply by the matrix squared).
Select 所有 true statements about matrix models.
难度 2/5 · 今日首次完成可获 140 金币及少量额外奖励
The same transition matrix is reused each period — you do not redraw it. The other three are correct.
长期行为
- 反复向前推算通常会趋向一个不再变化的稳态。
- 在稳态,离开城市的人和搬入城市的人一样多,人口保持不变。
- 矩阵让你不必模拟每一年,就能找到这个长期平衡。
- 同样的思想也用于网页排名、遗传学和流行病模型。
建立模型时要保持一致:如果状态向量是乘在矩阵右边的列向量,就要让每一列的流动率之和等于 $1$,这样就不会有人被遗漏或凭空产生。不匹配的设置会在不知不觉中给出无意义的预测。
城市 $= 600$,郊区 $= 400$(千人)。每年有 $5\%$ 的城市居民搬到郊区,有 $2\%$ 的郊区居民搬到城市。
- 离开城市的人数:$0.05 \times 600 = 30$;搬入城市的人数:$0.02 \times 400 = 8$。
- 更新后的城市人口 $= 600 - 30 + 8 = 578$;更新后的郊区人口 $= 400 + 30 - 8 = 422$。
- 矩阵通过一次乘法就完成了这些计算。
状态向量记录每个状态当前的数量,转移矩阵储存它们之间的流动率。把矩阵乘以状态向量,就能让模型向前推算一个周期;反复相乘可以预测长期行为。这就是矩阵为现实世界中的变化建模的方式。
根据给定数据写出答案
- 转移矩阵的行分别为 (1, 0) 和 (0, 2)。
- 当前状态为 (4, 3)。
- 求下一状态。
A transition matrix with rows (1, 0) and (0, 2) multiplies the state vector (4, 3). What is the next state vector?
2 times 3 is 6.
What is the next state?
难度 1/5 · 今日首次完成可获 100 金币及少量额外奖励
Only the second state is scaled by 2.
出了什么问题?只有网站团队能看到这些信息。