A Game of Thrones(12)

9.TYRION(0)

Somewhere in the great stone maze of Winterfell, a wolf howled. The sound hung over the castle like a flag of mourning.
Tyrion Lannister looked up from his books and shivered, though the library was snug and warm. Something about the howling of a wolf took a man right out of his here and now and left him in a dark forest of the mind, running naked before the pack.
When the direwolf howled again, Tyrion shut the heavy leatherbound cover on the book he was reading, a hundred-year-old discourse on the changing of the seasons by a long-dead maester. He covered a yawn with the back of his hand. His reading lamp was flickering, its oil all but gone, as dawn light leaked through the high windows. He had been at it all night, but that was nothing new. Tyrion Lannister was not much a one for sleeping.
His legs were stiff and sore as he eased down off the bench. He massaged some life back into them and limped heavily to the table where the septon was snoring softly, his head pillowed on an open book in front of him. Tyrion glanced at the title. A life of the Grand Maester Aethelmure, no wonder. “Chayle,” he said softly. The young man jerked up, blinking, confused, the crystal of his order swinging wildly on its silver chain. “I’m off to break my fast. See that you return the books to the shelves. Be gentle with the Valyrian scrolls, the parchment is very dry. Ayrmidon’s Engines of War is quite rare, and yours is the only complete copy I’ve ever seen.” Chayle gaped at him, still half-asleep. Patiently, Tyrion repeated his instructions, then clapped the septon on the shoulder and left him to his tasks.
Outside, Tyrion swallowed a lungful of the cold morning air and began his laborious descent of the steep stone steps that corkscrewed around the exterior of the library tower. It was slow going; the steps were cut high and narrow, while his legs were short and twisted. The rising sun had not yet cleared the walls of Winterfell, but the men were already hard at it in the yard below. Sandor Clegane’s rasping voice drifted up to him. “The boy is a long time dying. I wish he would be quicker about it.”
Tyrion glanced down and saw the Hound standing with young Joffrey as squires swarmed around them. “At least he dies quietly,” the prince replied. “It’s the wolf that makes the noise. I could scarce sleep last night.”
Clegane cast a long shadow across the hard-packed earth as his squire lowered the black helm over his head. “I could silence the creature, if it please you,” he said through his open visor. His boy placed a longsword in his hand. He tested the weight of it, slicing at the cold morning air. Behind him, the yard rang to the clangor of steel on steel.
The notion seemed to delight the prince. “Send a dog to kill a dog!” he exclaimed. “Winterfell is so infested with wolves, the Starks would never miss one.”
Tyrion hopped off the last step onto the yard. “I beg to differ, nephew,” he said. “The Starks can count past six. Unlike some princes I might name.”
Joffrey had the grace at least to blush.
“A voice from nowhere,” Sandor said. He peered through his helm, looking this way and that. “Spirits of the air!”
The prince laughed, as he always laughed when his bodyguard did this mummer’s farce. Tyrion was used to it. “Down here.”
The tall man peered down at the ground, and pretended to notice him. “The little lord Tyrion,” he said. “My pardons. I did not see you standing there.”
“I am in no mood for your insolence today.” Tyrion turned to his nephew. “Joffrey, it is past time you called on Lord Eddard and his lady, to offer them your comfort.”
Joffrey looked as petulant as only a boy prince can look. “What good will my comfort do them?”
“None,” Tyrion said. “Yet it is expected of you. Your absence has been noted.”
“The Stark boy is nothing to me,” Joffrey said. “I cannot abide the wailing of women.”
Tyrion Lannister reached up and slapped his nephew hard across the face. The boy’s cheek began to redden.
“One word,” Tyrion said, “and I will hit you again.”
“I’m going to tell Mother!” Joffrey exclaimed.
Tyrion hit him again. Now both cheeks flamed.
“You tell your mother,” Tyrion told him. “But first you get yourself to Lord and Lady Stark, and you fall to your knees in front of them, and you tell them how very sorry you are, and that you are at their service if there is the slightest thing you can do for them or theirs in this desperate hour, and that all your prayers go with them. Do you understand? Do you?”
The boy looked as though he was going to cry. Instead, he managed a weak nod. Then he turned and fled headlong from the yard, holding his cheek. Tyrion watched him run.
A shadow fell across his face. He turned to find Clegane looming overhead like a cliff. His soot-dark armor seemed to blot out the sun. He had lowered the visor on his helm. It was fashioned in the likeness of a snarling black hound, fearsome to behold, but Tyrion had always thought it a great improvement over Clegane’s hideously burned face.
“The prince will remember that, little lord,” the Hound warned him. The helm turned his laugh into a hollow rumble.
“I pray he does,” Tyrion Lannister replied. “If he forgets, be a good dog and remind him.” He glanced around the courtyard. “Do you know where I might find my brother?”
“Breaking fast with the queen.”
“Ah,” Tyrion said. He gave Sandor Clegane a perfunctory nod and walked away as briskly as his stunted legs would carry him, whistling. He pitied the first knight to try the Hound today. The man did have a temper.
A cold, cheerless meal had been laid out in the morning room of the Guest House. Jaime sat at table with Cersei and the children, talking in low, hushed voices.
“Is Robert still abed?” Tyrion asked as he seated himself, uninvited, at the table.
His sister peered at him with the same expression of faint distaste she had worn since the day he was born. “The king has not slept at all,” she told him. “He is with Lord Eddard. He has taken their sorrow deeply to heart.”
“He has a large heart, our Robert,” Jaime said with a lazy smile. There was very little that Jaime took seriously. Tyrion knew that about his brother, and forgave it. During all the terrible long years of his childhood, only Jaime had ever shown him the smallest measure of affection or respect, and for that Tyrion was willing to forgive him most anything.
A servant approached. “Bread,” Tyrion told him, “and two of those little fish, and a mug of that good dark beer to wash them down. Oh, and some bacon. Burn it until it turns black.” The man bowed and moved off. Tyrion turned back to his siblings. Twins, male and female. They looked very much the part this morning. Both had chosen a deep green that matched their eyes. Their blond curls were all a fashionable tumble, and gold ornaments shone at wrists and fingers and throats.
Tyrion wondered what it would be like to have a twin, and decided that he would rather not know. Bad enough to face himself in a looking glass every day. Another him was a thought too dreadful to contemplate.
Prince Tommen spoke up. “Do you have news of Bran, Uncle?”
“I stopped by the sickroom last night,” Tyrion announced. “There was no change. The maester thought that a hopeful sign.”
“I don’t want Brandon to die,” Tommen said timorously. He was a sweet boy. Not like his brother, but then Jaime and Tyrion were somewhat less than peas in a pod themselves.
“Lord Eddard had a brother named Brandon as well,” Jaime mused. “One of the hostages murdered by Targaryen. It seems to be an unlucky name.”
“Oh, not so unlucky as all that, surely,” Tyrion said. The servant brought his plate. He ripped off a chunk of black bread.
Cersei was studying him warily. “What do you mean?”
Tyrion gave her a crooked smile. “Why, only that Tommen may get his wish. The maester thinks the boy may yet live.” He took a sip of beer.
Myrcella gave a happy gasp, and Tommen smiled nervously, but it was not the children Tyrion was watching. The glance that passed between Jaime and Cersei lasted no more than a second, but he did not miss it. Then his sister dropped her gaze to the table. “That is no mercy. These northern gods are cruel to let the child linger in such pain.”
“What were the maester’s words?” Jaime asked.
The bacon crunched when he bit into it. Tyrion chewed thoughtfully for a moment and said, “He thinks that if the boy were going to die, he would have done so already. It has been four days with no change.”
“Will Bran get better, Uncle?” little Myrcella asked. She had all of her mother’s beauty, and none of her nature.
“His back is broken, little one,” Tyrion told her. “The fall shattered his legs as well. They keep him alive with honey and water, or he would starve to death. Perhaps, if he wakes, he will be able to eat real food, but he will never walk again.”
“If he wakes,” Cersei repeated. “Is that likely?”
“The gods alone know,” Tyrion told her. “The maester only hopes.” He chewed some more bread. “I would swear that wolf of his is keeping the boy alive. The creature is outside his window day and night, howling. Every time they chase it away, it returns. The maester said they closed the window once, to shut out the noise, and Bran seemed to weaken. When they opened it again, his heart beat stronger.”
The queen shuddered. “There is something unnatural about those animals,” she said. “They are dangerous. I will not have any of them coming south with us.”
Jaime said, “You’ll have a hard time stopping them, sister. They follow those girls everywhere.”
Tyrion started on his fish. “Are you leaving soon, then?”

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 支持向量机非线性回归通用MATLAB程序解析 #### 一、概述 本文将详细介绍一个基于MATLAB的支持向量机(SVM)非线性回归的通用程序。该程序采用支持向量机方法来实现数据的非线性回归,并通过不同的核函数设置来适应不同类型的数据分布。此外,该程序还提供了数据预处理的方法,使得用户能够更加方便地应用此程序解决实际问题。 #### 二、核心功能与原理 ##### 1. 支持向量机(SVM) 支持向量机是一种监督学习模型,主要用于分类和回归分析。对于非线性回归任务,SVM通过引入核技巧(kernel trick)将原始低维空间中的非线性问题转换为高维空间中的线性问题,从而实现有效的非线性建模。 ##### 2. 核函数 核函数的选择直接影响到模型的性能。本程序内置了三种常用的核函数: - **线性核函数**:`K(x, y) = x'y` - **多项式核函数**:`K(x, y) = (x'y + 1)^d` - **径向基函数(RBF)**:`K(x, y) = exp(-γ|x - y|^2)` 其中RBF核函数被广泛应用于非线性问题中,因为它可以处理非常复杂的非线性关系。本程序默认使用的是RBF核函数,参数`D`用于控制高斯核函数的宽度。 ##### 3. 数据预处理 虽然程序本身没有直接涉及数据预处理的过程,但在实际应用中,对数据进行适当的预处理是非常重要的。常见的预处理步骤包括归一化、缺失值处理等。 ##### 4. 模型参数 - **Epsilon**: ε-insensitive loss function的ε值,控制回归带宽。 - **C**: 松弛变量的惩罚系数,控制模型复杂度与过拟合的风险之间的平衡。 #### 三、程序实现细节 ##### 1. 函数输入与输出 - **输入**: - `X`: 输入特征矩阵,维度为(n, l),其中n是特征数量,l是样本数量。 - `Y`: 目标值向量,长度为l。 - `Epsilon`: 回归带宽。 - `C`: 松弛变量的惩罚系数。 - `D`: RBF核函数的参数。 - **输出**: - `Alpha1`: 正的拉格朗日乘子向量。 - `Alpha2`: 负的拉格朗日乘子向量。 - `Alpha`: 拉格朗日乘子向量。 - `Flag`: 标记向量,表示每个样本的类型。 - `B`: 偏置项。 ##### 2. 核心代码解析 程序首先计算所有样本间的核矩阵`K`,然后构建二次规划问题并求解得到拉格朗日乘子向量。根据拉格朗日乘子的值确定支持向量,并计算偏置项`B`。 - **核矩阵计算**:采用RBF核函数,通过`exp(-(sum((xi-xj).^2)/D))`计算任意两个样本之间的相似度。 - **二次规划**:构建目标函数和约束条件,使用`quadprog`函数求解最小化问题。 - **支持向量识别**:根据拉格朗日乘子的大小判断每个样本是否为支持向量,并据此计算偏置项`B`。 #### 四、程序扩展与优化 - **多核函数支持**:可以通过增加更多的核函数选项,提高程序的灵活性。 - **自动调参**:实现参数自动选择的功能,例如通过交叉验证选择最优的`Epsilon`和`C`值。 - **并行计算**:利用MATLAB的并行计算工具箱加速计算过程,特别是当样本量很大时。 #### 五、应用场景 该程序适用于需要进行非线性回归预测的场景,如经济预测、天气预报等领域。通过调整核函数和参数,可以有效应对各种类型的非线性问题。 ### 总结 本程序提供了一个支持向量机非线性回归的完整实现框架,通过灵活的核函数设置和参数调整,能够有效地处理非线性问题。对于需要进行回归预测的应用场景,这是一个非常实用且强大的工具。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值