Search

Why Even Try, Man?

I recently came upon Brian Granger and Jake VanderPlas’s Altair, a promising young visualization library. Altair seems well-suited to addressing Python’s ggplot envy, and its tie-in with JavaScript’s Vega-Lite grammar means that as the latter develops new functionality (e.g., tooltips and zooming), Altair benefits — seemingly for free!

Indeed, I was so impressed by Altair that the original thesis of my post was going to be: “Yo, use Altair.”

But then I began ruminating on my own Pythonic visualization habits, and — in a painful moment of self-reflection — realized I’m all over the place: I use a hodgepodge of tools and disjointed techniques depending on the task at hand (usually whichever library I first used to accomplish that task1).

This is no good. As the old saying goes: “The unexamined plot is not worth exporting to aPNG.”

Help Spread this Importantish Idea

Like this:

Deep Learning is amazing. But why is Deep Learning so successful? Is Deep Learning just old-school Neural Networks on modern hardware? Is it just that we have so much data now the methods work better? Is Deep Learning just a really good at finding features. Researchers are working hard to sort this out.

This means the success of Deep Learning is intimately related to some very deep and subtle ideas from Theoretical Physics. In this post we examine this.

Unsupervised Deep Learning: AutoEncoder Flow Map

An AutoEncoder is a Unsupervised Deep Learning algorithm that learns how to represent an complex image or other data structure $latex X $. There are several kinds of AutoEncoders; we care about so-called Neural Encoders–those using Deep Learning techniques to reconstruct the data:

Help Spread this Importantish Idea

Like this:

“Don’t aim at success – the more you aim at it and make it a target, the more you are going to miss it. For success, like happiness, cannot be pursued; it must ensue, and it only does so as the unintended side-effect of one’s dedication to a cause greater than oneself or as the by-product of one’s surrender to a person other than oneself. Happiness must happen, and the same holds for success: you have to let it happen by not caring about it. I want you to listen to what your conscience commands you to do and go on to carry it out to the best of your knowledge. Then you will live to see that in the long run – in the long run, I say! – success will follow you precisely because you had forgotten to think of it.”

– Viktor E. Frankl

Help Spread this Importantish Idea

Like this:

The stench of death was growing stronger, despite the scented candles. The smell reminded Jaime Lannister of the pass below the Golden Tooth, where he had won a glorious victory in the first days of the war. On the morning after the battle, the crows had feasted on victors and vanquished alike, as once they had feasted on Rhaegar Targaryen after the Trident. How much can a crown be worth, when a crow can dine upon on king?

“Who will protect us now?”
Jaime kissed her cheek. “He left a son.”
“Aye, he did. That is what I fear the most, in truth.”
That was a queer remark. “Why should you fear?”
“Jaime,” she said, tugging on his ear, “sweetling, I have known you since you were a babe at Joanna’s breast. You smile like Gerion and fight like Tyg, and there’s some of Kevan in you, else you would not wear that cloak…but Tyrion is Tywin’s son, not you. I said so once to your father’s face, and he would not speak to me for half a year. Men are such thundering great fools. Even the sort who come along once in a thousand years.”

Edmure Tully finally found his voice. “I could climb out of this tub and kill you where you stand, Kingslayer.”
“You could try.” Jaime waited. When Edmure made no move to rise, he said, “I’ll leave you to enjoy your food. Singer, play for our guest whilst he eats. You know the song, I trust.”
“The one about the rain? Aye, my lord. I know it.”
Edmure seemed to see the man for the first time. “No. Not him. Get him away from me.”
“Why, it’s just a song,” said Jaime. “He cannot have that bad a voice.”

Arya

“Do you fear death?”
She bit her lip. “No.”
“Let us see.” The priest lowered his cowl. Beneath he had no face; only a yellowed skull with a few scraps of skin still clinging to the cheeks, and a white worm wriggling from one empty eye socket. “Kiss me, child,” he croaked, in a voice as dry and husky as a death rattle.Does he think to scare me? Arya kissed him where his nose should be and plucked the grave worm from his eye to eat it, but it melted like a shadow in her hand.
The yellow skull was melting too, and the kindliest old man that she had ever seen was smiling down at her. “No one has ever tried to eat my worm before,” he said. “Are you hungry, child?”Yes, she thought, but not for food.

He picked up her silver fork. “This belongs to Arya of House Stark. All these things belong to her. There is no place for them here. There is no place for her. Hers is too proud a name, and we have no room for pride. We are servants here.”
“I serve,” she said, wounded. She liked the silver fork.
“You play at being a servant, but in your heart you are a lord’s daughter. You have taken other names, but you wore them as lightly as you might wear a gown. Under them was always Arya.”
…
“Before you drink from the cold cup, you must offer all you are to Him of Many Faces. Your body. Your soul. Yourself. If you cannot bring yourself to do that, you must leave this place.”
“The iron coin -”
“- has paid your passage here. From this point you must pay your own way, and the cost is dear.”
“I don’t have any gold.”
“What we offer cannot be bought with gold. The cost is all of you. Men take many paths through this vale of tears and pain. Ours is the hardest. Few are made to walk it. It takes uncommon strength of body and spirit, and a heart both hard and strong.”
…
Sometimes it seemed a thousand years since she had fled King’s Landing, and sometimes it seemed like only yesterday, but she knew she could not go back. “I’ll go if you want me, but I won’t go there.”
“My wants do not matter,” said the kindly man. “It may be that the Many-Faced God has led you here to be His instrument, but when I look at you I see a child…and worse, a girl child. Many have served Him of Many Faces through the centuries, but only a few of His servants have been women. Women bring life into the world. We bring the figt of death. No one can do both.”He is trying to scare me away, Arya thought, the way he did with the worm. “I don’t care about that.”
“You should. Stay, and the Many-Faced God will take your ears, your nose, your tongue. He will take your sad grey eyes that have seen so much. He will take your hands, your feet, your arms and legs, your private parts. He will take your hopes and dreams, your loves and hates. Those who enter His service must give up all that makes them who they are. Can you do that?” He cupped her chin and gazed deep into her eyes, so deep it made her shiver. “No,” he said, “I do not think you can.”

“And who are you, child?”
“No one.”
“A lie.”
“How do you know? Is it magic?”
“A man does not need to be a wizard to know truth from falsehood, not if he has eyes. You need only learn to read a face. Look at the eyes. The mouth. The muscles here, at the corners of the jaw, and here, where the neck joins the shoulder.” He touched her lightly with two fingers. “Some liars blink. Some stare. Some look away. Some lick their lips. Many cover their mouths just before they tell a lie, as if to hide their deceit. Other signs may be more subtle, but they are always there. A false smile and a true one may look alike, but they are as different as dusk and dawn. Can you tell dusk from dawn?”
Arya nodded, though she was not certain that she could.

Samwell Tarly

No happy choice. Sam thought of all the trials that he and Gilly suffered, Craster’s Keep and the death of the Old Bear, snow and ice and freezing winds, days and days and days of walking, the wights at Whitetree, Coldhands and the tree of ravens, the Wall, the Wall, the Wall, the Black Gate beneath the earth. What had it all been for? No happy choices and no happy endings… The wind was in the sails, and to the north Sam could even see a scattering of stars, and the red wanderer the free folk called the Thief. That ought to be my star, Sam thought miserably. I helped to make Jon Lord Commander, and I brought him Gilly and the babe. There are no happy endings.

They could do as they wished with her; imprison her, rape her, kill her, it made no matter. She had lived too long, and Ned was waiting. It was Robb she feared for. “On my honor as a Tully,” she told Lord Walder, “on my honor as a Stark, I will trade your boy’s life for Robb’s. A song for a son.” Her hand shook so badly she was ringing Jinglebell’s head.Boom, the drum sounded, boom doom boom doom. The old man’s lips went in and out. The knife trembled in Catelyn’s hand, slippery with sweat. “A son for a son, heh,” he repeated. “But that’s a grandson…and he never was much use.”
A man in dark armor and a pale pink cloak spotted with blooed stepped up to Robb. “Jaime Lannister sends his regards.” He thrust his longsword through her son’s heart, and twisted.
Robb had broken his word, but Catelyn kept hers. She tugged hard on Aegon’s hair and sawed at his neck until the blade grated on bone. Blood ran hot over her fingers. His little bells were ringing, ringing, ringing, and the drum went boom doom boom.
Finally someone took the knife away from her. The tears burned like vinegar as they ran down her cheeks.
…
It hurst so much, she thought. Our children, Ned, all our sweet babes. Rickon, Bran, Arya, Sansa, Robb… Robb… please, Ned, please, make it stop, make it stop hurting… The white tears and the red ones ran together until her face was torn and tattered, the face that Ned had loved. Catelyn Stark raised her hands and watched the blood run down her long fingers, over her wrists, beneath the sleeves of her gown. Slow red worms crawled along her arms and under her clothes. It tickles. That made her laugh until she screamed. “Mad,” someone said, “she’s lost her wits,” and someone else said, “Make an end,” and a hand grabbed her scalp just as she’d done with Jinglebell, and she thought, No, don’t, don’t cut my hair, Ned loves my hair. Then the steel was at her throat, and its bite was red and cold.

Jaime Lannister

“Tell them the Mad King is dead,” he commanded. “Spare all those who yield and hold them captive.”

“Shall I proclaim a new king as well?” Crakehall asked, and Jaime read the question plain: Shall it be your father, or Robert Baratheon, or do you mean to try to make a new dragonking? He thought for a moment of the boy Viserys, fled to Dragonstone, and of Rhaegar’s infant son Aegon, still in Maegor’s with his mother. A new Targaryen king, and my father as Hand. How the wolves will howl, and the storm lord choke with rage. For a moment he was tempted, until he glanced down again at the body on the floor, in its spreading pool of blood. His blood is in both of them, he thought. “Proclaim who you bloody well like,” he told Crakehall. Then he climbed the Iron Throne and seated himself with his sword across his knees, to see who would come to claim the kingdom. As it happened, it had been Eddard Stark.You had no right to judge me either, Stark.

“It fell to me to hold the Red Keep, but I knew we were lost. I sent to Aerys asking his leave to make terms. My man came back with a royal command. ‘Bring me your father’s head, if you are no traitor.’ Aerys would have no yielding. Lord Rossart was with him, my messenger said. I knew what that meant.
“When I came on Rossart, he was dressed as a common man-at-arms, hurrying to a postern gate. I slew him first. Then I slew Aerys, before he could find someone else to carry his message to the pyromancers. Days later, I hunted down the others and slew them as well. Belis offered me gold, and Garigus wept for mercy. Well, a sword’s more merciful than fire, but I don’t think Garigus much appreciated the kindess I showed him”
The water had grown cool. When Jaime opened his eyes, he found himself staring at the stump of his sword hand. The hand that made me Kingslayer. The goat had robbed him of his glory and his shame, both at once. Leaving what? Who am I now?

“Ser Jaime?” Even in soiled pink satin and torn lace, Brienne looked more like a man in a gown than a proper woman. “I am grateful, but… you were well away. Why come back?”
A dozen quips came to mind, each crueler than the one before, but Jaime only shrugged. “I dreamed of you,” he said.

“And if you think for one misbegotten moment that I would wed Joffery’s widow…”
“You are my son -”
“I am a knight of the Kingsguard. The Lord Commander of the Kingsguard! And that’s all I mean to be!”
Firelight gleamed golden in the stiff whiskers that framed Lord Tywin’s face. A vein pulsed in his neck, but he did not speak. And did not speak. And did not speak.
The strained silence went on until it was more than Jaime could endure. “Father…” he began.
“You are not my son.” Lord Tywin turned his face away. “You say you are the Lord Commander of the Kingsguard, and only that. Very well, ser. Go do your duty.”

He felt a bone-deep ache in his phantom fingers. I’ve lost a hand, a father, a son, a sister, and a lover, and soon enough I will lose a brother. And yet they keep telling me House Lannister has won this war.

Oberyn Martell, the Red Viper

“It’s said that there are to be seventy-seven dishes served at the king’s wedding feast.”
“Are you hungry, my prince?”
“I have hungered for a long time. Though not for food. Pray tell me, when will the justice be served?”
…
“Justice.” Yes, that is why he’s here, I should have seen that at once. “You were close to your sister.”
…
“Dwarf,” said the Red Viper, in a tone grown markedly less cordial, “spare me your Lannister lies. Is it sheep you take us for, or fools? My brother is not a bloodthirsty man, but neither has he been asleep for sixteen years… I came for justice for Elia and her children, and I will have it. Starting with this lummox Gregor Glegane… but not, I think, ending there.”

The Hound

“A knight’s a sword with a horse. The rest, the vows and the sacred oils and the lady’s favors, they’re silk ribbons tied around the sword. Maybe the sword’s prettier with ribbons hanging off of it, but it will kill you just as dead.”

Jon Snow

Jon took another swallow of mead. There is only one tale that he might believe. “You say you were at Winterfell, the night my father feasted King Robert.”
“I did say it, for I was.”
“Then you saw us all. Prince Joffrey and Prince Tommen, Princess Myrcella, my brothers Robb and Bran and Rickon, my sisters Arya and Sansa. You saw them walk the center aisle with every eye upon them and take their seats at the table just below the dais where the king and queen were seated.”
“I remember.”
“And did you see where I was seated, Mance?” He leaned forward. “Did you see where they put the bastard?”
Mance Rayder looked at Jon’s face for a long moment. “I think we had best find you a new cloak,” the king said, holding out his hand.

Daenerys

“Tell me, then – when he touched a man on the shoulder with his sword, what did he say? ‘Go forth and kill the weak?’ Or ‘Go forth and defend them?’ At the Trident, those brave men Viserys spoke of who died beneath our dragon banners – did they give their lives because they believed in Rhaegar’s cause, or because they had been bought and paid for?” Dany turned to Mormont, crossed her arms, and waited for an answer.
“My queen,” the big man said slowly, “all you say is true. But Rhaegar lost on the Trident. He lost the battle, he lost the war, he lost the kingdom, and he lost his life. His blood swirled downriver with the rubies from his breastplate, and Robert the Usurper rode over his corpse to steal the Iron Throne. Rhaegar fought valiantly, Rhaegar fought nobly. Rhaegar fought honorably. And Rhaegar died.”

Sansa

They are children, Sansa thought. They are silly little girls, even Elinor. They’ve never seen a battle, they’ve never seen a man die, they know nothing. Their dreams were full of songs and stories, the way hers had been before Joffrey cut her father’s head off. Sansa pitied them. Sansa envied them.

“I know I’m not the sort of husband young girls dream of, Sansa,” he said softly, “but neither am I Joffrey.”
“No,” she said. “You were kind to me. I remember.”
Tyrion offered her a thick, blunt-fingered hand. “Come, then. Let us do our duty.”…This is not right, this is not fair, how have I sinned that the gods would do this to me, how?
“On my honor as a Lannister,” the Imp said, “I will not touch you until you want me to.”
It took all the courage that was in her to look in those mismatched eyes and say, “And if I never want you to, my lord?”
His mouth jerked as if she had slapped him. “Never?”
Her neck was so tight she could scarcely nod.
“Why,” he said, “that is why the gods made whores for imps like me.” He closed his short blunt fingers into a fist and climbed down off the bed.

He had this all prepared for me. “My lord, I… I do not understand… Joffrey gave you Harrenhal, made you Lord Paramount of the Trident…why…”
“Why should I wish him dead?” Littlefinger shrugged. “I had no motive. Besides, I am a thousand leagues away in the Vale. Always keep your foes confused. If they are never certain who you are or what you want, they cannot know what you are like to do next. Sometimes the best way to baffle them is to make moves that have no purpose, or even seem to work against you. Remember that, Sansa, when you come to play the game.”
“What… what game?”
“The only game. The game of thrones.”

Tyrion

“The Crag is not so far from Tarbeck Hall and Castamere,” Tyrion pointed out. “You’d think the Westerlings might have ridden past and seen the lesson there.”
“Mayhaps they have,” Lord Tywin said. “They are well aware of Castamere, I promise you.”
“Could the Westerlings and Spicers be such great fools as to believe the wolf can defeat the lion?”
Everyone in a very long while, Lord Tywin Lannister would actually threaten to smile; he never did, but the threat alone was terrible to behold. “The greatest fools are ofttimes more clever than the men who laugh at them,” he said, and then, “You will marry Sansa Stark, Tyrion. And soon.”

Tyrion stared up at his father’s hard green eyes with their flecks of cold bright gold. “Guilty,” he said, “so guilty. Is that what you wanted to hear?”
Lord Tywin said nothing. Mace Tyrell nodded. Prince Oberyn looked mildly disappointed. “You admit you poisoned the king?”
“Nothing of the sort,” said Tyrion. “Of Joffrey’s death I am innocent. I am guilty of a more monstrous crime.” HE took a step toward his father. “I was born. I lived. I am guilty of being a dwarf, I confess it. And no matter how many times my good father forgave me, I have persisted in my infamy.”
“This is folly, Tyrion,” declared Lord Tywin. “Speak to the matter at hand. You are not on trial for being a dwarf.”
“That is where you err, my lord. I have been on trial for being a dwarf my entire life.”

It all goes back and back, Tyrion thought, to our mothers and fathers and theirs before them. We are puppets dancing on the strings of those who came before us, and one day our own children will take up our strings and dance on in our steads.

He found his father where he knew he’d find him, seated in the dimness of the privy tower, bedrobe hiked up around his hips…
“What did you do with Tysha?”
“Tysha”
He does not even remember her name. “The girl I married.”
“Oh, yes. Your first whore.”
Tyrion took aim at his father’s chest. “The next time you say that word, I’ll kill you.”
“You do not have the courage.”
…
“Tysha. What did you do with her, after my little lesson?”
“I don’t recall.”
“Try harder. Did you have her kill?”
His father pursed his lips. “There was no reason for that, she’d learned her place…and had been well paid for her day’s work, I seem to recall. I suppose the steward sent her on her way. I never thought to inquire.”
“On her way where?”
“Wherever whores go.”
Tyrion’s finger clenched. The crossbow whanged just as Lord Tywin started to rise. The bolt slammed into him above the groin and he sat back down with a grunt…”You shot me,” he said incredulously, his eyes glassy with shock.
“You always were quick to grasp a situation, my lord,” Tyrion said. “That must be why you’re the Hand of the King.”
“You…you are no…no son of mine.”
“Now that’s where you’re wrong, Father. Why, I believe I’m you writ small. Do me a kindness now, and die quickly. I have a ship to catch.”
For once, his father did what Tyrion asked him. The proof was the sudden stench, as his bowels loosened in the moment of death. Well, he was in the right place for it, Tyrion thought. But the stink that filled the privy gave ample evidence that the oft-repeated jape about his father was just another lie.
Lord Tywin Lannister did not, in the end, shit gold.