Machine Learning Explained – Part 1.2

Please note that I will not be covering the mathematical portions, but rather the big ideas.

Model Representation

Can come in different forms, however at the end of the day we are trying to learn a function in order to map or training. Such that it becomes a good predictor of an output given a inputs, this is a sort of regression problem. Where as functions who’s outputs are limited to a few discrete outputs, given various inputs are for classification problems.

Cost Functions

These functions are used to measure the level of accuracy of our hypothesis functions (the function we learned), by measuring the difference between our predicted value and the true output. And then computing the average error by way of the “Mean Squared Error” function. In a single variable regression problem the hypothesis function reduces to being the equation of a line.

The objective becomes to minimize the cost (or error) function. If you have ever taken Calculus before you can do that easily by taking the derivate of the function, setting it equal to zero, solving for the parameter, and using that value in your learned function.

However its not always easy when given a large set of parameters. Therefor you can also use contour plots, that act like maps to the values that reduce cost function to zero.

Gradient Descent

An easy way to think about gradient descent is by, imagining your a blind person trying to find a ball in a hilly area. You don’t know where the ball is, but you know the ball has rolled into the deepest valley in the area. However your blind so you can’t see the depth in your surroundings. Therefor you have to use your feet to feel for the steepness of the ground in front of you. By doing so you take little steps in the direction of the most steepness. This is exactly what the gradient descent algorithm does as well. It takes little steps, gauges the steepness, and then moves in that directions till it finds the global minimum of the cost function’s derivative.

You can find the first part of this series here.


Chapter 1


The woman who loved Noah

I am sorry

I was lying in bed, it was a Sunday. The smell of perfume still meandering through the air. I am not sure what it smelt like, it captured me and wouldn’t let go. I wanted to lay in bed with this smell engulfing my very being for all eternity. It made my primordial instincts confused, it smelt like what pleasures of the flesh felt like. I wondered if I lay here, with my eyes closed, and covers drawn, would I ever have the strength to raise up? As I stared up at the ceiling, who’s radiance was amplified by the shafts of light penetrating the window. I was filled with a lingering emptiness, the sort that can’t be filled, the sort that doesn’t ever get filled. For I never the emptiness wasn’t there as I grew. It only appeared after I gave all myself to another person. I shift my body to the right side of bed, without looking I feel around in the draw, for cigarettes. I take one and smoke. As I stare up at the ceiling, I can see the smoke raise up disappear into air almost as if it never existed to begin with. I close my eyes as I think that my life has been a collection of fleeting moments intertwined to others, by the red strings of fate.

I open my eyes. The sun has lurched higher in sky cover in gradients of blues, and streaked willowing white wisps. The light streamed into the room, and reflected off the mirror, creating a kaleidoscopic effect that drowned the room in ever which color of the rainbow. I turned in bed. I was greeted by her angelic face. I wondered why she had come home with me. A creature with so much grace, so much potential has chosen me. I reached out to caressed her face, I stopped half way and bring my hand back. I didn’t want to disturb the peace that she had, it was probably the only peace she would ever have. The world would only ever allow true piece in death. I lay there recovering from the night before, and the actions I had taken. My mind drifted through the vague memories of my life, from the time I first rode a bike, to when I first fell in love.

I felt as though I had lived a life other men could only dream of. I finally mustered up the strength to sit up right. I looked around the space. Was this my space ? There was little to no furniture, just large windows, and minimalist design everywhere. I stare out the window, hoping to reorient my mind. I lost my self, staring out the window, watching the rhythmic crashing of the waves, and smelling the salt in the air. Everything was frozen, everything was clear, I could feel rather than think.

I put on my robe. It wrapped me with a plush softness, and tightness that could only ever be felt, when hugged by a small child. I felt like the only thing in this world that accepted me for all that I was, was the robe. I walked out onto the balcony and let the wind flow over my skin, let the sun’s warmth reach every part of me. I must have stood there for hours.

My trance broke, when I thought I saw a boy and his dog playing catch from the corner of my eye. A smile ran across my face, for the boy reminded me of days where my happiness was never tied to any substance, or anyone. I think I had everything that anyone could ever want when I was five. Everything in the world was so foreign, my state of mind and conceptions of ideas and feels where still so new. I think those were the days I could call myself human. I don’t know how I became the person I am now.

I started to smell iron in the air; my nose was bleeding. It had made a pool on the dark slate floor. Sometimes I felt like it was the only time that I knew without a doubt I was alive. So much of my life was a husk of what it once was. At this point I felt as though it was okay to go back inside. The sand and sea, had stared into me as much as I had into them. I drifted across the room feeling the warmth of my feet, being draw away by the stone floor. I saw myself in the mirror, and asked myself, was that actually me? Is this what I looked like?

I made my way to the front porch, with a black cup of coffee. The bitterness of the dark liquid I swallowed, was drowned away by the intense amount of light and warmth. The sun was always worshiped in civilizations past, how far have we come that we never marvel at the warmth and light it provides us. The world had woken up, I was in the space between spaces, times that don’t have a name. It wasn’t early enough to be early, neither was it late enough to be the late. The exact time would be useless in order to find this time, for what was happening around me could only happen when the fate of objects both be and small where aligned just so.

There was still a bit of a chill in the air, there was still morning dew on the grass, and it wasn’t warm. It was one those rare times where the natural environment matched the artificial ones we created around us.

As I lay in my arm chair, I heard the cries and shouts of children playing. It was 3pm. My nights of debauchery had always resulted me in sleeping and rising at all times of the day. Without warning I was assaulted with a teddy bear. It had been thrown by one of the children. I stared at her as she did me. I saw it, I saw into her, I saw her entire life.

She would never live a normal life that the others did, and I wouldn’t be around to ever see it. This unassuming little girl, with pig tails, curly hair, and missing teeth, would one day hold such unfathomable value.  Although I had seen it time and time again. I could do nothing to help her to transition into the woman she would become.

I had filled my life with everything that people could ever want. I could never find anything satisfying, so I gave up trying. I had thought my life would have been much different as a younger man. I had thought that I would never achieve as much as I had done.

The girl defiantly run up to me and took back her teddy bear. I laughed as she ran away, it was the first time that a laugh wasn’t forced, in a long time. And then… then I remembered her. At the time it was the first time I had ever seen a creature like her. Her face was one that brought out the lust, jealousy, and want in others. I was much younger at that time, much more open to the world around me. That was over 30 years ago.

I finish my coffee, and slipped back into the arms of the past night’s lover. Sometimes I feel as though pleasures of the flesh are nothing but a sick illusion from god himself. As a form spit, since god is god. God, is he who is absolute, as a mere mortal I think god could never feel the same pleasures we could. We are human, and it is our fundamental flaws that allow as to feel the pleasures we do.