Snake_Byte[15] Fourier, Discrete and Fast Transformers

The frequency domain of mind (a mind, it must be stressed, is an unextended, massless, immaterial singularity) can produce an extended, spacetime domain of matter via ontological Fourier mathematics, and the two domains interact via inverse and forward Fourier transforms.

~ Dr. Cody Newman, The Ontological Self: The Ontological Mathematics of Consciousness

I am Optimus Transformer Ruler Of The AutoCorrelation Bots

First i trust everyone is safe. i haven’t written technical blog in a while so figured i would write a Snake_Byte on one of my favorite equations The Fourier Transform:

    \[\hat{f} (\xi)=\int_{-\infty}^{\infty}f(x)e^{-2\pi ix\xi}dx\]

More specifically we will be dealing with the Fast Fourier Transform which is an implementation of The Discrete Fourier Transform. The Fourier Transform operates on continuous signals and while i do believe we will have analog computing devices (again) in the future we have to operate on 0’s and 1’s at this juncture thus we have a discrete version thereof. The discrete version:

    \[F(x) &= f\f[k] &= \sum_{j=0}^{N-1} x[j]\left(e^{-2\pi i k/N}\right)^j\0 &\leq k < N\]

where:

    \[f[k] &= f_e[k]+e^{-2\pi i k/N}f_o[k]\f[k+N/2] &= f_e[k]-e^{-2\pi i k/N}f_o[k]\]

The Discrete Fourier Transform (DFT) is a mathematical operation. The Fast Fourier Transform (FFT) is an efficient algorithm for the evaluation of that operation (actually, a family of such algorithms). However, it is easy to get these two confused. Often, one may see a phrase like “take the FFT of this sequence”, which really means to take the DFT of that sequence using the FFT algorithm to do it efficiently.

The Fourier sequence is a kernel operation for any number of transforms where the kernel is matched to the signal if possible. The Fourier Transform is a series of sin(\theta) and cos(\theta) which makes it really useful for audio and radar analysis.

For the FFT it only takes O(n\log{}n) for the sequence computation and as one would imagine this is a substantial gain. The most commonly used FFT algorithm is the Cooley-Tukey algorithm, which was named after J. W. Cooley and John Tukey. It’s a divide and conquer algorithm for the machine calculation of complex Fourier series. It breaks the DFT into smaller DFTs. Other FFT algorithms include the Rader’s algorithm, Winograd Fourier transform algorithm, Chirp Z-transform algorithm, etc. The only rub comes as a function of the delay throughput.

There have been amazing text books written on this subject and i will list them at the end of the blarg[1,2,3]

So lets get on with some code. First we do the usual houskeeping on import libraries as well as doing some majik for inline display if you are using JupyterNotebooks. Of note ffpack which is a package of Fortran subroutines for the fast Fourier transform. It includes complex, real, sine, cosine, and quarter-wave transforms. It was developed by Paul Swarztrauber of the National Center for Atmospheric Research, and is included in the general-purpose mathematical library SLATEC.

# House keeping libraries imports and inline plots:
import numpy as np
from scipy import fftpack
%matplotlib inline
import matplotlib.pyplot as pl

We now set up some signals where we create a sinusoid with a sample rate. We use linspace to set up the amplitude and signal length.

#frequency in cycles per second or Hertz
#this is equivalent to concert A

Frequency = 20 
# Sampling rate or the number of measurements per second
# This is the rate of digital audio

Sampling_Frequency = 100 

# set up the signal space:
time = np.linspace(0,2,2 * Sampling_Frequency, endpoint = False)
signal = np.sin(Frequency * 2 * np.pi * time)

Next we plot the sinusoid under consideration:

# plot the signal:
fif, ax = plt.subplots()
ax.plot(time, signal)
ax.set_xlabel('Time [seconds]')
ax.set_ylabel('Signal Amplitude')

Next we apply the Fast Fourier Transform and transform into the frequency domain:

X_Hat = fftpack.fft(signal)
Frequency_Component = fftpack.fftfreq(len(signal)) * Sampling_Frequency

We now plot the transformed sinusoid depicting the frequencies we generated:

# plot frequency components of the signal:
fig, ax = plt.subplots()
ax.stem(Frequency_Component, np.abs(X_Hat)) # absolute value of spectrum
ax.set_xlabel ('Frequency in Hertz [HZ] Of Transformed Signal')
ax.set_ylabel ('Frequency Domain (Spectrum) Magnitude')
ax.set_xlim(-Sampling_Frequency / 2, Sampling_Frequency / 2)
ax.set_ylim(-5,110)

To note you will see two frequency components, this is because there are positive and negative (real and imaginary) components to the transform which is what we see using the stem plots as expected. This is because the kernel as mentioned before is both sin(\theta) and cos(\theta).

So something really cool happens when using the FFT. It is called the convolution theorem as well as Dual Domain Theory. Convolution in the time domain yields multiplication in the frequency domain. Mathematically, the convolution theorem states that under suitable conditions the Fourier transform of a convolution of two functions (or signals) is the poin-twise (Hadamard multiplication) product of their Fourier transforms. More generally, convolution in one domain (e.g., time domain) equals point-wise multiplication in the other domain (e.g., frequency domain).

Where:

    \[x(t)*h(t) &= y(t)\]

    \[X(f) H(f) &= Y(f)\]

So there you have it. A little taster on the powerful Fourier Transform.

Until Then,

#iwishyouwater <- Cloudbreak this past year

Muzak To Blarg by: Voyager Essential Max Ricther. Phenomenal. November is truly staggering.

References:

[1] The Fourier Transform and Its Applications by Dr Ronald N Bracewell. i had the honor of taking the actual class at Stanford University from Professor Bracewell.

[2] The Fourier Transform and Its Applications by E. Roan Brigham. Graet book on butterfly and overlap-add derivations thereof.

[3] Adaptive Digital Signal Processing by Dr. Claude Lindquist. A phenomenal book on frequency domain signal processing and kernel analysis. A book ahead of its time. Professor Lindquist was a mentor and had a direct effect and affect on my career and the way i approach information theory.

¿Por qué haces apnea? (Why Do You Freedive?) and 9/11

Me Manifesting And Searching (photo by @clay.motus.liquidum)

I need the sea because it teaches me. I don’t know if I learn music or awareness, if it’s a single wave or its vast existence, or only its harsh voice or its shining suggestion of fishes and ships. The fact is that until I fall asleep, in some magnetic way I move in
the university of the waves.

~ Pablo Neruda

First i trust everyone is safe. Second today is a day that will live forever in most minds as a day that i call ‘When Belief Systems Run Amuck (WBSRA)”.

To those who lost loves ones on 9.11 my condolences. To those who are permanently scarred may peace eventually see its’ way unto and into you.

It is not random that one of my dear friends “JH” is relocating this very week to Charleston, SC. He was in the North tower on the 87th floor when the “WBSRA” occurred.

He is a great human. We are going to have a blast when he gets here.

Recently more than ever humans around me have been talking more and more about “stuff” they do besides “working” and inevitably as we are discussing these outside work endeavors someone mentions that i freedive.

Clay T. Talley Rappelling Underwater (photo Tanner Peterson @depthwishfreediving)

It goes something like this:

Human: Ted freedives.

Everyone: ( looking at me like i have obtained the classified UAP documents from the All-domain Anomaly Resolution Office (AARO)…)

Me: Yup.

Human: Wow really?

Me: (thinking… No i just lie about stuff like that…) Why Yes i do.

Me and @clay.motus.liquidum (photo courtesy of @depthwishfreediving)

Human: Have you seen “Deepest Breath” On Netflix?

Me: While i do not watch hardly any TV i did view it and yes it was amazing. The people in that video are the best of the best in the world and i have met one or two of them and have been coached and critiqued by some of them. i’m no where in their league.

Human: So really is it one breath? There must be some trick? How long can you hold your breath? How deep do you go?

Me: Yes, No, about 4:00+ minutes and i have broken 100ft . None of it really matters as the folks who are great, i pale in comparison, but it is a starting point. It is also not a contest with others. While there are competitions the only competitor is you and the water.

Me coming up from looking at the sand somewhere (photo courtesy of @depthwishfreediving)

Human: What is it like?

Me: It is truth. If there is a truth to life it is closer to living with the exception at least for me, what i find in surfing. Although the two are very different, the results, from to time, are the same. Complete un-adulterated FLOW STATE. The free fall is very close to getting a full tube ride. It is all enveloping it is not like meditating as some people think it is, although, there is a somnambulistic component to the free fall.

Clay Talley and Jacob Talley the day Jacob was certified (photo courtesy of @depthwishfreediving)

Human: What is freefall?

Me: That is after you get down to about 14 meters which is around 45 feet that is 3 atmospheres of pressure you start getting pulled down the elevator shaft as i call it. You can feel the water rushing by you and the sounds rushing, depending on if your hooked to a line or just letting your hand brush the dive line. Then as you go deeper it gets more enveloping.

Me: See your Mammalian Dive Reflect kicks in, your MDR, the master switch as it were. The sensors are still in our face. This is why it feels so nice to splash water on your face or take a shower. All those negative ions getting you balanced into BlueMind. There is much we have forgotten as a race. There is an excellent book called BlueMind i highly recommend.

Me, Thomas Tanner (@itstomfoolery) and My Nephew, Ty Tanner (@tytanner_) the day they got certified

(photo courtesy of @depthwishfreediving)

Human: Yea but how can you hold your breath that long?

Me: Practice. Actually it all happened in one weekend at Performance Freediving Institute (PFI). Me and my waterman commrade Clay Talley went down on a Friday and took a class after we read a book called “One Breath” and got turned onto a song called “Waves” by Bahamas. We have been training with weights in the pool for about 15 years for surfing then this freediving wonderland rabbit hole came along. We could easily get you to over a 2:30 breath hold in one day. Nothing prepared us for what was to come.

Human: I don’t see how that is possible.

Me: Well, i suppose with an attitude like that nothing is possible, but at least we gave it the benefit of the doubt and when we got certified. It was really intense due to several factors that i would have to explain later. However by far my certification was in one of the top experiences of my life and about as close to a religious experience as one could get.

My Son Thomas Tanner getting certified with Tanner Peterson Lower Left (photo courtesy of @tctjr)

Then then THE question:

Human: Why do you do it?

Me: Do what? Freedive?

Human: Yes.

This, Oh Dear Reader is where we start getting to the essence of the blog. Hope Y’all are still tuned-in to the channel.

To every sailor the gods have given a comrade
While one sleeps the other keeps watch on the bridge
When one doubts the other gives him his faith
When one falls the other discovers the oasis of ice for both of them
When my comrade loses faith I laugh confidently
When my comrade sleeps I keep watch for him
When my comrade falls I fight on for the both of us
Because to every sailor the gods have given a comrade

~ Blood Axis

Me: Well it is complicated. One of my best friends died freediving. He was one of the few people who really knew me and and happened to be the best coding computer scientist i have ever met, as well as an expert Waterman.

Me wondering what the Puppies are Thinking. (photo courtesy @clay.motus.luquidum)

Human: Oh i had no idea i am so sorry.

Me: Oh please no need for condolences. i’ll never get over it but that is a different issue. That said to answer your question i got into it because i wanted to understand how one of the smartest most fit watermen i have ever met came to his demise doing what he loved. i had to know or at least try to understand what Steven was searching for given i knew him so well.

It’s not tragic to die doing something you love.

~ Mark Foo

Me: See i kinda blew it off years ago when he kept talking about freediving and how incredible it was and in fact the last thing he said to me was he was really happy. That is really all i cared about to be honest. However it still nagged at me about there was a facet of “The Water” i hadn’t addressed.

So through a very seemingly random occurrence which to me wasn’t random at all i ran across the book “One Breath” which was a story of the death of one of the greatest freedivers of all time. So we (me and my commrade Clay Talley) finally got around to getting down so to speak and since then it has been a continual Alice in Wonderland – Down The Rabbit Hole. Besides the fact that you burn about 800-1000 calories an hour freediving it only teaches you more about yourself. It is indeed a fractal situation – the more complex – the more complex – the more simple – the more simple.

Me ascending and hanging out in Bonaire with Carlos Coste

(photo courtesy of @carloscoste1 of @blueclassroom and @freediveeexplorations)

Ted, Its all in Your Mind, Get me? Understand What I am saying?!

~ Cole Heitt

Me: Its really a super performant sport. All of the people that i have met have been physicists, composers, lawyers, bankers, technical folks and many have walked away from those careers in full pursuit of freediving. Everyone is very open, welcoming and focused. There is little to no overhead with some of the crap that you get with other sports endeavors, it is very binary. As an aside i personally want to dive with Sperm Whales.

Human: Yes but what about your friend?

Me: Well if i could have a discussion with him first i would punch him for being stupid then i would hug him, tell him i love him and say lets go for a freedive and this time i’ll be up and you be down.

Clay Talley Searching For Clay T. Talley

Me: Feel free to come down and get in the pool or we can take you down and get certified.

Human: Really?

Me: Of course and you can’t blame me for what will happen afterward.

To everyone that has ever asked me this is why i freedive. I needed to understand why and it has turned into a mirror for me.

On September 11, 2005, Steven Swenson took his last breath. However i know he was happy in fact the happiest i have ever heard him.

Recently his favorite musician past away, Jimmy Buffett. Steven’s favorite song was Son of A Son of A Sailor. He also liked “That is What Living Is to Me” and “One Particular Harbor”. I would like to think they are sharing sailing stories with each other with wind in their hair and water in their shoes.

Do me a favor if you knew him go listen to any of those songs and if you didn’t know him go listen and raise a glass to the ocean. i would also greatly appreciate it.

Mickey Talley @mich.888 Pushing Past Her Own Thoughts (photo courtesy @clay.motus.liquidum)

So there you have it folks.

Until Then,

#iwishyouwater <- Me and Present Crew Getting After it @iwishyouwater

@tctjr

Music To Blog By: The version of “Little Wing/ Third Stone: From The Sun off SRV archives and some Jimmy Buffett. The Tuck and Patti version of Castles Made of Sand / Little Wing is amazing as well.

Note: With Much Love to Roma, Lief and Gage.

Quality Over Quantity (Part D’eux)

Determination, energy, and courage appear spontaneously when we care deeply about something. We take risks that are unimaginable in any other context.

Margaret J. Wheatley

First i trust everyone is safe. Second sometimes the LazyWebTM can actually be a really cool place. Someone out there used an amazing thing called a LARGE LANGUAGE MODEL AKA ARTIFICIAL INTELLIGENCE to make a song out of a book passage that closely relates to my previous blog on Quality Over Quantity. The book is entitled The Greatest Salesman In The World. Here is that passage:

“I will persist until I succeed.

I was not delivered unto this world in defeat, nor does failure course in my veins. I am not a sheep waiting to be prodded by my shepherd. I am a lion and I refuse to talk, to walk, to sleep with the sheep. I will hear not those who weep and complain, for their disease is contagious. Let them join the sheep. The slaughterhouse of failure is not my destiny.

I will persist until I succeed.

The prizes of life are at the end of each journey, not near the beginning; and it is not given to me to know how many steps are necessary in order to reach my goal. Failure I may still encounter at the thousandth step, yet success hides behind the next bend in the road. Never will I know how close it lies unless I turn the corner.

Always will I take another step. If that is of no avail I will take another, and yet another. In truth, one step at a time is not too difficult.

I will persist until I succeed.”1

Then they “told” ChatGPT the person(s) behind the green curtain to write a metal song using the above passage:

(Verse 1)
Hear my mantra echo, “Persist until success,
Born not to the world in defeat, nor failure’s caress.
Not a sheep in the herd, prodded, guided by the rest,
I am the lion roaring, refusal in my chest.

(Chorus)
I won’t be moved by tears and whines, their sickness I’ll resist,
In the abattoir of failure, I’ll never coexist.
The end of every journey hides the precious prize,
One more step around the bend, where success quietly lies.

(Verse 2)
Step by step, relentless, no distance is too great,
Every challenge faced is just another weight.
My efforts like the blade, the mighty oak I strike,
Insignificant they seem, but will fell the tree in time.

(Chorus)
Like rain that washes mountains, the ant that feasts on tigers bold,
I am the star that lights the earth, the tale that’s yet untold.
Building castles, brick by brick, with each repeated trial,
Persist until I succeed, in my journey, every mile.

(Bridge)
Defeat is not a concept, its words I shall erase,
Quitting, failure, impossible, all fall from grace.
Obstacles may rise, despair may cloud the way,
Yet above it all, my gaze is fixed, where greener pastures lay.

(Chorus)
Persist until I succeed, let this anthem ring,
Born a lion, not a sheep, to my purpose, I will cling.
Journey’s end may hide the prize, step by step I’ll tread,
In the echoes of the night, let my mantra be heard and said.

(Outro)
I will persist until I succeed, etched in stars, this creed,
For I am the lion roaring, fulfilling every need.
The end of every journey hides the precious prize,
Persist until I succeed, echoes my eternal cry.

The book talks about The Art Of Living wherein there is the World’s Greatest Salesmen who was given some scrolls he must past to another person who he must identify with as being the keeper of the scrolls. The book goes into depth and each chapter is a scroll. A teaching if you will for being the world’s greatest salesmen so you as being the reader are immersed into this world.

Maybe someone will put some music to these words. i was thinking something like a Thin Lizzy feel if you will.

Until Then,

#iwishyouwater. <- WSL Live. Teahpoo Tahiti.

tctjr.

  1. OG Mandino: The Greatest Salesman In the World also referring to the #ArtOfLiving a class created by McConaughey and Tony Robbins ↩︎

Quality Over Quantity

Dalle’s Idea of Quality Over Quantity

Be a yardstick of quality.

Some people aren’t used to an environment where excellence is expected.

S. Jobs

First i hope this finds everyone safe. Second, your humble narrator has been incognito of late and re-emerged safe and sound as the CTO of a really cool company called BigBear.ai . Third, for some reason or another several folks have been talking to me about risks and reward in life as of late. i haven’t written a blarg in a while so i figured i would take the time to jot down some thoughts.

i dedicate this blarg to my parents. Here is why.

A long time ago in a land far away i lived in a modest ranch style house in Charleston,SC and in the den area there was a sign that said:

It is better to live one year as a lion than 20 years as a chicken.

Anonymous

This is a modified quote that can be tracked to several people in history. i am by no means referencing any political or religious views herewith so please check yourself. Someone somewhere could play the same music and someone would hate them for it on the internet.

i read this everyday coming in and out of the house and it had a profound effect on me later in life. Without me even knowing it i gravitated towards living on the creative side or maker side of life or let’s say risk taking side of life.

If you obey all the rules, you’ll miss all the fun.

Katheryn Hepburn

In the same fashion, for some unknown reason, people have been asking or talking to me about the creative process as well as having hobbies that appear to be risk taking.

For the record i don’t view anything that i do as a i hobby nearly as dangerous as driving. i’ll probably do a blarg on one activity everyone seems to be asking about is freediving but that isnt the subject of this blarg.

Life is to be lived folks. Social norms keep many from going and doing and living a life they DREAM. i hear you saing: “Well you know how it is life gets in the way.” Nope boys and girls your brain gets in the way and says “Oh you could never do that what would people think?”. “My <insert person here> would just disown me.”

What if you do it and you are truly happy?

The other thing people have been saying to me lately is “How’d you do that?” Well i just went and did it. Once again someone somewhere isn’t going to like whatever you do and you can’t please everyone so you might as well please yourself as the song says. (Rick Nelson – Garden Party).

Most people who really care about you just want you to be happy. They might not like or agree with you when letting your freak flag fly or even imagine how you could live in such a manner but i guarantee you show up to those you love truly happy then everything will be really OK. This is on YOU as it is on THEM. This is a two way street folks. You choose a difficult path not everyone is going to be “accepting”. The road will be strewn with stones to your path of righteousness. Trust me – Caveat Emptor.

The goal is living in a high quality life over a mundane mediocre life. The moments that take your breath away versus the number of breaths in a life. Where do you see a coffee table book entitled “Lives Of The Mediocre.”

Which is very closely related to the creation process. Putting yourself out there is scary. “Yes but i don’t have the courage or the skills.” You know what? Neither did anyone else who went and did The Thing.

Go do the thing that scares you the most then get the courage. That fine line is living. In fact it has been my experience it is a near life experience. Standing at the edge and looking down. Where you even surprise yourself.

“Yea but what if something goes wrong?”

Once again great question. It will. Yes Oh Dear Reader it will but guess what sitting in the recliner or couch every night for the rest of your life or looking out the window and thinking “I wish i would have done…” is way more painful than either pissing someone off for a little while or a broken leg, All will heal with love and happiness.

So put me on a highway
Show me a sign
Take it to the limit
One more time

The Eagles

Recently after a lengthy discussion about risk taking, mental gymnastics or physical hobbies someone asked me about my injuries. Here is a partial list:

Right shoulder replaced, Plates and 8 screws in my right forearm, Two left shoulder reconstructions, Two hip replacements, Broken right ankle and leg twice, Broke ribs, hernia operation, broken nose, cracked back, whiplashes, concussions, the list goes on…

Why would someone put themselves through this? I don’t know sounds like a startup co-founder huh? Because you MUST.

Because living at that level of passion is everything. There is nothing else. Because you know what? The crash is almost as amazing as making it! Quality Over Quantity Folks!

Taking this view In sports, companies and most importantly your relationships is crucial. Most will say they cannot live like that and they do not understand. Well just hand them a big cup of NOPE YA CAN’T. They will get very frustrated as well. Most people of that nature want their predictable life and the ability to dictate to others their lives.

So this morning i called my parents. Luckily both my parents are alive and very married. I told them thank you for having that sign in the den and it would be great if they could find the sign. They informed me it “wore out”. Get the symbology there? They said they had toted it from house to house.

After hanging up i went online to everyone’s favorite online retailer and bought this for my home gym:

Because i needed a reminder. Just like when i was a kid.

Enjoy it while you can
It’s just like the weather
So quit complaining brother
No one lives forever

Let’s have a party there’s a full moon in the sky
It’s the hour of the wolf and I don’t want to’ die

Oingo Boingo

So go create, make, live, and love like there is no tomorrow. You and the people around you will be better off and you will definitely find out who loves you when you are truly happy. Trust me in this area of life you will not have many if any followers just those who truly desire you to be happy.

Until Then,

#iwishyouwater <- near life at Mavericks in 2022.

@tctjr

Muzak To Blag By: Danny Elfman’s “Big Mess”. He is truly a genius. Yes the same person who created Oingo Boingo and all of the great soundtracks.

NOTE: i can also recommend several books on these views such as Tim Ferris’ “Tools For Titans” and Rolo May’s “The Courage To Create”, hit me up on the comments if you want more. Also please tell me a story where you put yourself out there. i’d love it hear about it.

What Is Love?

DALLE’s Idea Of Love

Love is a complex and multifaceted emotion that is often defined differently depending on cultural, social, and individual perspectives. At its core, love typically involves strong feelings of affection, caring, and attachment towards another person, often accompanied by a desire for intimacy, closeness, and mutual support.

Love can take many different forms, including romantic love, familial love, platonic love, and self-love. It can also involve a range of different experiences, such as joy, happiness, excitement, passion, and sometimes even pain and heartbreak.

Ultimately, love is a powerful and transformative force that can have a profound impact on our lives, shaping our relationships, beliefs, and sense of self.

~ ChatGPT

First Oh Dear Reader, i trust you are safe. Second, we are taking a slight detour into squishy, non-exact, messy, and truly complicated land: Emotions. This comes on the heels of Snake_Byte[14] Coding In Philosophical Frameworks. Also if you haven’t seen the news, the Cognitive Computing Arms Race with Large Language Models is in full swing. Boy Howdy Do We Love Us Some Anthropomorphism! ( i personally think its funny the parlor trick of auto-typing makes ChatGPT and all the other ones appear human to most. )

Turns out there is a class at Stanford on Computational Philosophy which is in the same realm as what i would love to discuss however slightly obtuse. It is a good read.

If we can compute Philosophical frameworks, could we or do we need to compute emotions in the future?

It was not random i started with the terseness of Stoicism. As this philosophy trends towards being objective in your emotions, akin to a more recent philosophy, “Objectivism.” We can quantify the aspects thereof. Or at least we think we can quantify them to some extent.

We know from a physiological standpoint that bodily metrics and chemicals can be measured for systematic responses to emotions. Dopamine, Vasopressin, Oxytocin, Serotonin, heart rate, sweat level, skin clamminess, and eye dilation are just a few measurable considerations.

However what does it mean?

Let’s take some bookend emotions: Love, Hate, Fear.

Some consider Fear to be the only true emotion. Flight or Fight. i’m also positive we can duplicate this in a machine or at least make it plausible to appear the machine is scared. (Also, it will make humans “feel” better one day but that is for a different discussion and different blog.)

Being that Spring Is In The Air let us choose LOVE.

There are so many types and kinds of Love.

  • Love of a Mother to a child
  • The Love you have for your pets
  • The Love of eating a doughnut.

i’m not referring to these types i am referencing:

  • You are the Love of My Life Companionship – Love

Books, signs, poetry, and yes, humans’ most deplorable creation War has been created over Love of Another. It is genuinely innate in the Human_Condition.

People acting a fool, if you will. You have seen it many times, and maybe (hopefully) you have done it.

As the famous song says, “What does love have to do with IT? What is love but some secondhand emotion?”. Great questioning Tina. We love you.

Have you ever been in The Love? How do you know that person Loves YOU?

i asked one of my progeny that question:

Me: “Do i Love you?”

Them: “Yes.”

Me” “How do you know?”

Them: “Dad i just know.”

This is not to be confused with infatuation, which is in and of itself an extremely intense feeling usually associated with a physically idealized version of the receiving person. Infatuation is initially overwhelming but then quickly fades. Love, on the other hand, appears to be a much deeper, almost seemingly “infinite forever-giving” emotion.

i was wondering how many times “Love” has been mentioned over the years. Below is a plot thereof:

Love Over The Years

i thought the drop in the 1980’s was interesting. If anyone was around in the United States in the 80’s that was the period of certain illegal chemicals, neon, 80’s metal and madonna. The Me Generation.

So what has happened in this area with using technology of Love? Well we scan our noggin:

From The Journal of Frontiers in Human Neuroscience

When I take you in my arms gathered forever. Sometimes it feels like a dream. Sometimes it feels like a dream; to be with you.

~ Feels Like A Dream Lyrics

Research has shown that certain brain regions are activated when a person is in love or experiencing strong feelings of affection, including the insula, anterior cingulate cortex, and striatum. These regions are associated with reward, motivation, and emotional processing. Brain scans have also revealed that the levels of certain neurotransmitters, like dopamine and oxytocin, can change in response to being in love. So while there is no one-size-fits-all image of someone in love, there are certain brain patterns and chemical changes that can be detected in those experiencing the emotion.

Furthermore on the chemical brain related activity research has shown that during the early stages of romantic love, there is a decrease and increase in serotonin levels in the brain[1]. Serotonin can have direct affects on anxiety, insomnia and depression. For men there is a decrease and for women and increase in serotonin. Strangely this is similar to what is observed in individuals with obsessive-compulsive disorder, suggesting that the intense focus and preoccupation with the loved one may be related to changes in serotonin levels. Additionally, it has been found that long-term couples who remain in love have higher levels of serotonin than those who have fallen out of love. This suggests that serotonin may play a role in maintaining long-term relationships.

Our study provides the first evidence of love-related alterations in the underlying architecture of the brain, and the results shed new light on the mechanisms of romantic love.

~ Professor Xiaochu Zhang

So if there are (and there are injectable adjuncts to all of these chemicals) that can be augmented and tailored with specific dosages, this led me to ask the questions:

  • can we compute a model of Love?
  • can we fool the brain into thinking it is in Love?
  • do we want to augment the brain so we feel like we are in Love?
  • Do we want to make Love a thing of the past with future tech?
  • The list could go on…..

 Did my heart love till now? Forswear it, sight / For I ne’er saw true beauty till this night.

~ That Romeo Guy

When people meet, go on a date, shack up, get hitched or get married, i have heard it said:

  • “You will grow to love them.”
  • “Well, the person doesn’t really have the attributes i am looking for in a mate, but i can adapt.”
  • “They share the same interest as you!”
  • “They can cook or fix stuff for you!”

Why would we want to change or have that person change? Are social norms so strong that there are unwritten rules that we as a so-called society must follow, With a hard rule of it must be two consenting adults in a relationship, what is it of anyone’s business? Do most want to do what they feel they should do? Do we want a best friend to watch the big game with or play golf? Why not a companion that you can dance with now and when your old and just look at each other? To idealized? Oh life gets in the way. i see it is hard and you have stuff to do – yep i get it. Then is Love that important? If not then what is?

Love in a relationship is it needed?

How do you know when you’re really in Love? Do violins play when you’re touching the one your Lovin?

~ The Tubes

Most often, love is due to their connection with their partner. This connection can be emotional, physical, spiritual, or intellectual (or hopefully all of them). People may also fall in love or grow into love because they appreciate their partner’s qualities or values, such as kindness, honesty, or intelligence. Sometimes, people are drawn to others who are different from themselves because they find them intriguing or exciting.

This room is bare
This night is cold
We’re far apart, and I’m growing old
But while we live
We’ll meet again
So then, my love
We may whisper once more
It’s you I adore

~ Palabras de Amor from Queen

Other factors that contribute to love include shared experiences, common interests, and mutual respect. When people feel like they’re a team with their partner and can rely on them, it can deepen their love. Additionally, physical attraction and chemistry can significantly influence romantic love.

However, what if it is all of these with the same partner? Isn’t that what you truly desire? ALL THE THINGS! To truly know that there is one – what would you do to have that person show up on your porch?

This is what i believe we need to understand as we trend toward a world of distributed disconnected artificial intelligence.

In one kiss, you’ll know all I haven’t said.

~ Pablo Neruda[3]

Even post the pandemic, we see people hug and kiss less. There is less physicality which as we all know for most, a hug feels good for both and releases several proof-positive chemicals. i would tend to think at some point you want to rub against your significant other instead of smooching in cyberspace or sleeping in separate beds.

Is Love now an algorithm? i know in the age of match.com and tinder this appears to be monday morning quarterbacking but at least i believe there is something more to it than a list of attributes. In fact one of the startups i worked at started with the premise, “What are the three main questions you ask someone on a blind date?” Here they are:

  • What is your favorite travel spot?
  • What is your favorite wine (assuming one drinks)
  • What type of music do you like?
DALLE Generated Endless Love

From a cognitive standpoint the most difficult one was music recommendations. This by the way Oh Dear Reader was circa 2001 before Pandora, Shazam or any other music recommendation system. We based it on a cognitive model of music perception and cognitive psychology of inter-relations[2].

If we already know the future and can match it aren’t we living in a world of no surprises? What happens to that special glance? That special smile or touch or a good morning hug? That true everlasting one that loves you for you and only you not because your father mother or your in-laws approved. (If course it has been said you marry the family not the person. )

i am sure by now you have heard of the term Twin Flame. This is different than a soul mate. A Twin Flame is a mirror of oneself, a yin-yang type entity. The biggest distinction between a twin flame and any other type of soul mate is that twin flames are two halves of the same whole. A soul mate, on the other hand, can be thought of as someone cut from the same cloth as you. There’s a deep familiarity, and you feel very close, but you aren’t the same soul.

i wonder if we can compute and create a Twin Flame Agent of oneself?

i’m not sure i want to work on those future algorithms folks. Some things i want to be a mystery[4].

i’d love to hear some stories, comments, and possibly even rants as this is some very esoteric area we have paddled into so to speak. i’d love to know if you have the love of your life, twin flame or a tinder swipe of the night, i hope you just know.

Until Then,

#iwshyouwater <- alexy molchanov sets a new world record in Bonaire. i was just in the same spot freediving.

Muzak To Blog By: All The Love Songs by Queen. i miss you Freddy and recently brian may was knighted.

References:

[1] Scans Say Its True Love Link

[2] For the record, i tried the system, and no one liked strict cathedral organ works.

[3] Pablo Neruda is the most prolific poet when it comes to love and beaches i have ever read. there is a connection there.

[4] In blade runner, harrison ford knows full well racheal is a replicant yet he Loves her. Question is – Is He? That would be a twin flame. robot love.

Snake_Byte:[14] Coding In Philosophical Frameworks

Dalle-E Generated Philospher

Your vision will only become clear when you can look into your heart. Who looks outside, dreams; who looks inside, awakes. Knowing your own darkness is the best method for dealing with the darknesses of other people. We cannot change anything until we accept it.

~ C. Jung

(Caveat Emptor: This blog is rather long in the snakes tooth and actually more like a CHOMP instead of a BYTE. tl;dr)

First, Oh Dear Reader i trust everyone is safe, Second sure feels like we are living in an age of Deus Ex Machina, doesn’t it? Third with this in mind i wanted to write a Snake_Byte that have been “thoughting” about for quite some but never really knew how to approach it if truth be told. I cant take full credit for this ideation nor do i actually want to claim any ideation. Jay Sales and i were talking a long time after i believe i gave a presentation on creating Belief Systems using BeliefNetworks or some such nonsense.

The net of the discussion was we both believed that in the future we will code in philosophical frameworks.

Maybe we are here?

So how would one go about coding an agent-based distributed system that allowed one to create an agent or a piece of evolutionary code to exhibit said behaviors of a philosophical framework?

Well we must first attempt to define a philosophy and ensconce it into a quantized explanation.

Stoicism seemed to me at least the best first mover here as it appeared to be the tersest by definition.

So first those not familiar with said philosophy, Marcus Aurelius was probably the most famous practitioner of Stoicism. i have put some references that i have read at the end of this blog1.

Stoicism is a philosophical school that emphasizes rationality, self-control, and inner peace in the face of adversity. In thinking about this i figure To build an agent-based software system that embodies Stoicism, we would need to consider several key aspects of this philosophy.

  • Stoics believe in living in accordance with nature and the natural order of things. This could be represented in an agent-based system through a set of rules or constraints that guide the behavior of the agents, encouraging them to act in a way that is in harmony with their environment and circumstances.
  • Stoics believe in the importance of self-control and emotional regulation. This could be represented in an agent-based system through the use of decision-making algorithms that take into account the agent’s emotional state and prioritize rational, level-headed responses to stimuli.
  • Stoics believe in the concept of the “inner citadel,” or the idea that the mind is the only thing we truly have control over. This could be represented in an agent-based system through a focus on internal states and self-reflection, encouraging agents to take responsibility for their own thoughts and feelings and strive to cultivate a sense of inner calm and balance.
  • Stoics believe in the importance of living a virtuous life and acting with moral purpose. This could be represented in an agent-based system through the use of reward structures and incentives that encourage agents to act in accordance with Stoic values such as courage, wisdom, and justice.

So given a definition of Stoicism we then need to create a quantized model or discrete model of those behaviors that encompass a “Stoic Individual”. i figured we could use the evolutionary library called DEAP (Distributed Evolutionary Algorithms in Python ). DEAP contains both genetic algorithms and genetic programs utilities as well as evolutionary strategy methods for this type of programming.

Genetic algorithms and genetic programming are both techniques used in artificial intelligence and optimization, but they have some key differences.

This is important as people confuse the two.

Genetic algorithms are a type of optimization algorithm that use principles of natural selection to find the best solution to a problem. In a genetic algorithm, a population of potential solutions is generated and then evaluated based on their fitness. The fittest solutions are then selected for reproduction, and their genetic information is combined to create new offspring solutions. This process of selection and reproduction continues until a satisfactory solution is found.

On the other hand, genetic programming is a form of machine learning that involves the use of genetic algorithms to automatically create computer programs. Instead of searching for a single solution to a problem, genetic programming evolves a population of computer programs, which are represented as strings of code. The programs are evaluated based on their ability to solve a specific task, and the most successful programs are selected for reproduction, combining their genetic material to create new programs. This process continues until a program is evolved that solves the problem to a satisfactory level.

So the key difference between genetic algorithms and genetic programming is that genetic algorithms search for a solution to a specific problem, while genetic programming searches for a computer program that can solve the problem. Genetic programming is therefore a more general approach, as it can be used to solve a wide range of problems, but it can also be more computationally intensive due to the complexity of evolving computer programs2.

So returning back to the main() function as it were, we need create a genetic program that models Stoic behavior using the DEAP library,

First need to define the problem and the relevant fitness function. This is where the quantized part comes into play. Since Stoic behavior involves a combination of rationality, self-control, and moral purpose, we could define a fitness function that measures an individual’s ability to balance these traits and act in accordance with Stoic values.

So lets get to the code.

To create a genetic program that models Stoic behavior using the DEAP library in a Jupyter Notebook, we first need to install the DEAP library. We can do this by running the following command in a code cell:

pip install deap

Next, we can import the necessary modules and functions:

import random
import operator
import numpy as np
from deap import algorithms, base, creator, tools

We can then define the problem and the relevant fitness function. Since Stoic behavior involves a combination of rationality, self-control, and moral purpose, we could define a fitness function that measures an individual’s ability to balance these traits and act in accordance with Stoic values.

Here’s an example of how we might define a “fitness function” for this problem:

# Define the fitness function.  NOTE: # i am open to other ways of defining this and other models
# the definition of what is a behavior needs to be quantized or discretized and 
# trying to do that yields a lossy functions most times.  Its also self referential

def fitness_function(individual):
    # Calculate the fitness based on how closely the individual's behavior matches stoic principles
    fitness = 0
    # Add points for self-control, rationality, focus, resilience, and adaptability can haz Stoic?
    fitness += individual[0]  # self-control
    fitness += individual[1]  # rationality
    fitness += individual[2]  # focus
    fitness += individual[3]  # resilience
    fitness += individual[4]  # adaptability
    return fitness,

# Define the genetic programming problem
creator.create("FitnessMax", base.Fitness, weights=(1.0,))
creator.create("Individual", list, fitness=creator.FitnessMax)

# Initialize the genetic algorithm toolbox
toolbox = base.Toolbox()

# Define the genetic operators
toolbox.register("attribute", random.uniform, 0, 1)
toolbox.register("individual", tools.initRepeat, creator.Individual, toolbox.attribute, n=5)
toolbox.register("population", tools.initRepeat, list, toolbox.individual)
toolbox.register("evaluate", fitness_function)
toolbox.register("mate", tools.cxTwoPoint)
toolbox.register("mutate", tools.mutGaussian, mu=0, sigma=0.1, indpb=0.1)
toolbox.register("select", tools.selTournament, tournsize=3)

# Run the genetic algorithm
population = toolbox.population(n=10)
for generation in range(20):
    offspring = algorithms.varAnd(population, toolbox, cxpb=0.5, mutpb=0.1)
    fits = toolbox.map(toolbox.evaluate, offspring)
    for fit, ind in zip(fits, offspring):
        ind.fitness.values = fit
    population = toolbox.select(offspring, k=len(population))
    
# Print the best individual found
best_individual = tools.selBest(population, k=1)[0]

print ("Best Individual:", best_individual)
 

Here, we define the genetic programming parameters (i.e., the traits that we’re optimizing for) using the toolbox.register function. We also define the evaluation function (stoic_fitness), genetic operators (mate and mutate), and selection operator (select) using DEAP’s built-in functions.

We then define the fitness function that the genetic algorithm will optimize. This function takes an “individual” (represented as a list of five attributes) as input, and calculates the fitness based on how closely the individual’s behavior matches stoic principles.

We then define the genetic programming problem via the quantized attributes, and initialize the genetic algorithm toolbox with the necessary genetic operators.

Finally, we run the genetic algorithm for 20 generations, and print the best individual found. The selBest function is used to select the top individual fitness agent or a “behavior” if you will for that generation based on the iterations or epochs. This individual represents an agent that mimics the philosophy of stoicism in software, with behavior that is self-controlled, rational, focused, resilient, and adaptable.

Best Individual: [0.8150247518866958, 0.9678037028949047, 0.8844195735244268, 0.3970642186025506, 1.2091810770505023]

This denotes the best individual with those best balanced attributes or in this case the Most Stoic,

As i noted this is a first attempt at this problem i think there is a better way with a full GP solution as well as a tunable fitness function. In a larger distributed system you would then use this agent as a framework amongst other agents you would define.

i at least got this out of my head.

until then,

#iwishyouwater <- Alexey Molchanov and Dan Bilzerian at Deep Dive Dubai

Muzak To Blog By: Phil Lynott “The Philip Lynott Album”, if you dont know who this is there is a statue in Ireland of him that i walked a long way with my co-founder, Lisa Maki a long time ago to pay homage to the great Irish singer of the amazing band Thin Lizzy. Alas they took Phil to be cleaned that day. At least we got to walk and talk and i’ll never forget that day. This is one of his solo efforts and i believe he is one of the best artists of all time. The first track is deeply emotional.

References:

[1] A list of books on Stoicism -> click HERE.

[2] Genetic Programming (On the Programming of Computers by Means of Natural Selection), By Professor John R. Koza. There are multiple volumes i think four and i have all of this but this is a great place to start and the DEAP documentation. Just optimizing a transcendental functions is mind blowing what GP comes out with using arithmetic

Snake_Byte:[13] The Describe Function.

DALLE-2 Draws Describe

First i trust everyone is safe. Second i hope people are recovering somewhat from the SVB situation. We are at the end of a era, cycle or epoch; take your pick. Third i felt like picking a Python function that was simple in nature but very helpful.

The function is pandas.describe(). i’ve previously written about other introspection libraries like DABL however this is rather simple and in place. Actually i never had utilized it before. i was working on some other code as a hobby in the areas of transfer learning and was playing around with some data and decided to to use the breast cancer data form the sklearn library which is much like the iris data used for canonical modeling and comparison. Most machine learning is data cleansing and feature selection so lets start with something we know.

Breast cancer is the second most common cancer in women worldwide, with an estimated 2.3 million new cases in 2020. Early detection is key to improving survival rates, and machine learning algorithms can aid in diagnosing and treating breast cancer. In this blog, we will explore how to load and analyze the breast cancer dataset using the scikit-learn library in Python.

The breast cancer dataset is included in scikit-learn's datasets module, which contains a variety of well-known datasets for machine learning. The features describe the characteristics of the cell nuclei present in the image. We can load the dataset using the load_breast_cancer function, which returns a dictionary-like object containing the data and metadata about the dataset.

It has been surmised that machine learning is mostly data exploration and data cleaning.

from sklearn.datasets import load_breast_cancer
import pandas as pd

#Load the breast cancer dataset
data = load_breast_cancer()

The data object returned by load_breast_cancer contains the feature data and the target variable. The feature data contains measurements of 30 different features, such as radius, texture, and symmetry, extracted from digitized images of fine needle aspirate (FNA) of breast mass. The target variable is binary, with a value of 0 indicating a benign tumor and a value of 1 indicating a malignant tumor.

We can convert the feature data and target variable into a pandas dataframe using the DataFrame constructor from the pandas library. We also add a column to the dataframe containing the target variable.

#Convert the data to a pandas dataframe
df = pd.DataFrame(data.data, columns=data.feature_names)
df['target'] = pd.Series(data.target)

Finally, we can use the describe method of the pandas dataframe to get a summary of the dataset. The describe method returns a table containing the count, mean, standard deviation, minimum, and maximum values for each feature, as well as the count, mean, standard deviation, minimum, and maximum values for the target variable.

#Use the describe() method to get a summary of the dataset
print(df.describe())

The output of the describe method is as follows:

mean radius  mean texture  ...  worst symmetry      target
count   569.000000    569.000000  ...      569.000000  569.000000
mean     14.127292     19.289649  ...        0.290076    0.627417
std       3.524049      4.301036  ...        0.061867    0.483918
min       6.981000      9.710000  ...        0.156500    0.000000
25%      11.700000     16.170000  ...        0.250400    0.000000
50%      13.370000     18.840000  ...        0.282200    1.000000
75%      15.780000     21.800000  ...        0.317900    1.000000
max      28.110000     39.280000  ...        0.663800    1.000000

[8 rows x 31 columns]

From the summary statistics, we can see that the mean values of the features vary widely, with the mean radius ranging from 6.981 to 28.11 and the mean texture ranging from 9.71 to 39.28. We can also see that the target variable is roughly balanced, with 62.7% of the tumors being malignant.

Pretty nice utility.

Then again in looking at this data one would think we could get to first principles engineering and root causes and make it go away? This directly affects motherhood which i still believe is the hardest job in humanity. Makes you wonder where all the money goes?

Until then,

#iwishyouwater <- Free Diver Steph who is also a mom hunting pelagics on #onebreath

Muzak To Blog By Peter Gabriel’s “Peter Gabriels 3: Melt (remastered). He is coming out with a new album. Games Without Frontiers and Intruder are timeless. i applied long ago to work at Real World Studios and received the nicest rejection letter.

Execution Is Everything

bulb 2 warez

Even if we crash and burn and loose everthing the experience is worth ten times the cost.

~ S. Jobs

As always, Oh Dear Readers, i trust this finds you safe. Second, to those affected by the SVB situation – Godspeed.

Third, i was inspired to write a blog on “Doing versus Thinking,” and then i decided on the title “Execution Is Everything”. This statement happens to be located at the top of my LinkedIn Profile.

The impetus for this blog came from a recent conversation where an executive who told me, “I made the fundamental mistake of falling in love with the idea and quickly realized that ideas are cheap, it is the team that matters.”

i’ve written about the very issue on several occasions. In Three T’s of a Startup to Elite Computing, i have explicitly stated ideas are cheap, a dime a dozen. Tim Ferris, in the amazing book “Tools Of Titans,” interviews James Altuchur, and he does this exercise every day:

This is taken directly from the book in his words, but condensed for space, here are some examples of the types of lists James makes:

  • 10 olds ideas I can make new
  • 10 ridiculous things I would invent (e.g., the smart toilet)
  • 10 books I can write (The Choose Yourself Guide to an Alternative Education, etc).
  • 10 business ideas for Google/Amazon/Twitter/etc.
  • 10 people I can send ideas to
  • 10 podcast ideas or videos I can shoot (e.g., Lunch with James, a video podcast where I just have lunch with people over Skype and we chat)
  • 10 industries where I can remove the middleman
  • 10 things I disagree with that everyone else assumes is religion (college, home ownership, voting, doctors, etc.)
  • 10 ways to take old posts of mine and make books out of them
  • 10 people I want to be friends with (then figure out the first step to contact them)
  • 10 things I learned yesterday
  • 10 things I can do differently today
  • 10 ways I can save time
  • 10 things I learned from X, where X is someone I’ve recently spoken with or read a book by or about. I’ve written posts on this about the Beatles, Mick Jagger, Steve Jobs, Charles Bukowski, the Dalaï Lama, Superman, Freakonomics, etc.
  • 10 things I’m interested in getting better at (and then 10 ways I can get better at each one)
  • 10 things I was interested in as a kid that might be fun to explore now (like, maybe I can write that “Son of Dr. Strange” comic I’ve always been planning. And now I need 10 plot ideas.)
  • 10 ways I might try to solve a problem I have. This has saved me with the IRS countless times. Unfortunately, the Department is Motor Vehicles is impervious to my superpowers

Is your brain tired of just “thinking” about doing those gymnastics?

i cannot tell you how many people have come to me and said “hey I have an idea!” Great, so do you and countless others. What is your plan of making it a reality? What is your maniacal passion every day to get this thing off the ground and make money?

The statement “Oh I/We thought about that 3 years ago” is not a qualifier for anything except that fact you thought it and didn’t execute on said idea.  You know why?

Creating software from an idea that runs 24/7 is still rather difficult. In fact VERY DIFFICULT.

“Oh We THOUGHT about that <insert number of days or years ago here>. i call the above commentary “THOUGHTING”. Somehow the THOUGHT is manifested from Ideas2Bank? If that is a process, i’d love to see the burndown chart on that one. No Oh Dear Readers, THOUGHTING is about as useful as that overly complex PowerPoint that gets edited ad nauseam, and people confuse the “slideware” with “software”. The only code that matters is this:

Code that is written with the smallest OPEX and Highest Margins thereby increasing Revenue Per Employee unless you choose to put it in open source for a wonderful plethora of reasons or you are providing a philanthropic service.

When it comes to creating software, “Execution is everything.” gets tossed around just like the phrase “It Just Works” as a requirement. At its core, this phrase means that the ability to bring an idea to life through effective implementation is what separates successful software from failed experiments.

The dynamic range between average and the best is 2:1. In software it is 50:1 maybe 100:1 very few things in life are like this. I’ve built a lot of my sucess on finding these truly gifted people.

~ S. Jobs

In order to understand why execution is so critical in software development, it’s helpful first to consider what we mean by “execution.” Simply put, execution refers to the process of taking an idea or concept and turning it into a functional, usable product. This involves everything from coding to testing, debugging to deployment, and ongoing maintenance and improvement.

When we say that execution is everything in software development, what we’re really saying is that the idea behind a piece of software is only as good as the ability of its creators to make it work in the real world. No matter how innovative or promising an idea may seem on paper, it’s ultimately worthless if it can’t be brought to life in a way that users find valuable and useful.

You can fail at something you dislike just as easily as something you like so why not choose what you like?

~ J. Carey

This is where execution comes in. In order to turn an idea into a successful software product, developers need to be able to navigate a complex web of technical challenges, creative problem-solving, and user feedback. They need to be able to write code that is clean, efficient, and scalable. They need to be able to test that code thoroughly, both before and after deployment. And they need to be able to iterate quickly and respond to user feedback in order to improve and refine the product continually.

The important thing is to dare to dream big, then take action to make it come true.

~ J. Girard

All of these factors require a high degree of skill, discipline, and attention to detail. They also require the ability to work well under pressure, collaborate effectively with other team members, and stay focused on the ultimate goal of creating a successful product.

The importance of execution is perhaps most evident when we consider the many examples of software projects that failed despite having what seemed like strong ideas behind them. From buggy, unreliable apps to complex software systems that never quite delivered on their promises, there are countless examples of software that fell short due to poor execution.

On the other hand, some of the most successful software products in history owe much of their success to strong execution. Whether we’re talking about the user-friendly interface of the iPhone or the robust functionality of Paypal’s Protocols, these products succeeded not just because of their innovative ideas but because of the skill and dedication of the teams behind them.

The only sin is mediocrity[1].

~ M. Graham

In the end, the lesson is clear: when it comes to software development, execution really is everything. No matter how brilliant your idea may be, it’s the ability to turn that idea into a functional, usable product that ultimately determines whether your software will succeed or fail. By focusing on the fundamentals of coding, testing, and iterating, developers can ensure that their software is executed to the highest possible standard, giving it the best chance of success in an ever-changing digital landscape.

So go take that idea and turn it into a Remarkable Viable Product, not a Minimum Viable Product! Who likes Minimum? (thanks R.D.)

Be Passionate! Go DO! Go Create!

Go Live Your Personal Legend!

A great video stitching of discussions from Steve Jobs on execution, and passion – click here-> The Major Thinkers Steve Jobs

Until then,

#iwishyouwater <- yours truly hitting around 31 meters (~100ft) on #onebreath

@tctjr

Muzak To Blog By: Todd Hannigan “Caldwell County.”

[1] The only sin is mediocrity is not true if there were a real Sin it should be Stupidity but the quote fits well in the narrative.

Snake_Byte[12]: Dabl A High-Level Data Analysis Library in Python

Not To Be Confused With The Game

It enables us to dabble in vicarious vice and to sit in smug judgment on the result.

Online Quote Generator

First, i hope everyone is safe. Second i haven’t written a Snake_Byte [ ] in quite some time so here goes. This is a library i ran across late last night and well for what it achieves even for data exploration it is well worth the pip install dabl cost of it all.

Data analysis is an essential task in the field of machine learning and artificial intelligence. However, it can be a challenging and time-consuming task, especially for those who are not familiar with programming. That’s where the dabl library comes into play.

dabl, short for Data Analysis Baseline Library, is a high-level data analysis library in python, designed to make data analysis as easy and effortless as possible. It is an open-source library, developed and maintained by the scikit-learn community.

The library provides a collection of simple and intuitive functions for exploring, cleaning, transforming, and visualizing data. With dabl, users can perform various data analysis tasks such as regression, classification, clustering, anomaly detection, and more, with just a few lines of code.

One of the main benefits of dabl is that it helps users get started quickly by providing a set of default actions for each task. For example, to perform a regression analysis, users can simply call the “regression” function and pass in their data, and dabl will take care of the rest.

Another advantage of dabl is that it provides easy-to-understand visualizations of the results, allowing users to quickly understand the results of their analysis and make informed decisions based on the data. This is particularly useful for non-technical users who may not be familiar with complex mathematical models or graphs.

dabl also integrates well with other popular data analysis libraries such as pandas, numpy, and matplotlib, making it a convenient tool for those already familiar with these libraries.

So let us jump into the code shall we?

This code uses the dabl library to perform regression analysis on the Titanic dataset. The dataset is loaded using the pandas library and passed to the dabl.SimpleRegressor function for analysis. The fit method is used to fit the regression model to the data, and the score method is used to evaluate the performance of the model. Finally, the dabl.plot function is used to visualize the results of the regression analysis.

import dabl
import pandas as pd
import matplotlib.pyplot as plt

# Load the Titanic dataset from the disk
titanic = pd.read_csv(dabl.datasets.data_path("titanic.csv"))
#check shape columns etc
titanic.shape
titanic.head
#all that is good tons of stuff going on here but now let us ask dabl whats up:
titanic_clean = dabl.clean(titanic, verbose=1)

#a cool call to detect types
types = dabl.detect_types(titanic_clean)
print (types)
#lets do some eye candy
dabl.plot(titanic, 'survived')
#lets check the distribution
plt.show()
#let us try simple regression if it works it works
# Perform regression analysis
fc = dabl.SimpleClassifier(random_state=0)
X = titanic_clean.drop("survived", axis=1)
y = titanic_clean.survived
fc.fit(X, y)                     

Ok so lets break this down a little.

We load the data set: (make sure the target directory is the same)

# Load the Titanic dataset from the disk
titanic = pd.read_csv(dabl.datasets.data_path("titanic.csv"))

Of note we loaded this in to a pandas dataframe. Assuming we can use python and load a comma-separated values file lets now do some exploration:

#check shape columns etc
titanic.shape
titanic.head

You should see the following:

(1309, 14) 

Which is [1309 rows x 14 columns]

and then:

pclass  survived                                             name  \
0          1         1                    Allen, Miss. Elisabeth Walton   
1          1         1                   Allison, Master. Hudson Trevor   
2          1         0                     Allison, Miss. Helen Loraine   
3          1         0             Allison, Mr. Hudson Joshua Creighton   
4          1         0  Allison, Mrs. Hudson J C (Bessie Waldo Daniels)   
...      ...       ...                                              ...   
1304       3         0                             Zabour, Miss. Hileni   
1305       3         0                            Zabour, Miss. Thamine   
1306       3         0                        Zakarian, Mr. Mapriededer   
1307       3         0                              Zakarian, Mr. Ortin   
1308       3         0                               Zimmerman, Mr. Leo   

         sex     age  sibsp  parch  ticket      fare    cabin embarked boat  \
0     female      29      0      0   24160  211.3375       B5        S    2   
1       male  0.9167      1      2  113781    151.55  C22 C26        S   11   
2     female       2      1      2  113781    151.55  C22 C26        S    ?   
3       male      30      1      2  113781    151.55  C22 C26        S    ?   
4     female      25      1      2  113781    151.55  C22 C26        S    ?   
...      ...     ...    ...    ...     ...       ...      ...      ...  ...   
1304  female    14.5      1      0    2665   14.4542        ?        C    ?   
1305  female       ?      1      0    2665   14.4542        ?        C    ?   
1306    male    26.5      0      0    2656     7.225        ?        C    ?   
1307    male      27      0      0    2670     7.225        ?        C    ?   
1308    male      29      0      0  315082     7.875        ?        S    ?   

     body                        home.dest  
0       ?                     St Louis, MO  
1       ?  Montreal, PQ / Chesterville, ON  
2       ?  Montreal, PQ / Chesterville, ON  
3     135  Montreal, PQ / Chesterville, ON  
4       ?  Montreal, PQ / Chesterville, ON  
...   ...                              ...  
1304  328                                ?  
1305    ?                                ?  
1306  304                                ?  
1307    ?                                ?  
1308    ?                                ?  

Wow tons of stuff going on here and really this is cool data from an awful disaster. Ok let dabl exercise some muscle here and ask it to clean it up a bit:

titanic_clean = dabl.clean(titanic, verbose=1)
types = dabl.detect_types(titanic_clean)
print (types)

i set verbose = 1 in this case and dabl.detect_types() shows the types detected which i found helpful:

Detected feature types:
continuous      0
dirty_float     3
low_card_int    2
categorical     5
date            0
free_string     4
useless         0
dtype: int64

However look what dabl did for us;

                      continuous  dirty_float  low_card_int  categorical  \
pclass                     False        False         False         True   
survived                   False        False         False         True   
name                       False        False         False        False   
sex                        False        False         False         True   
sibsp                      False        False          True        False   
parch                      False        False          True        False   
ticket                     False        False         False        False   
cabin                      False        False         False        False   
embarked                   False        False         False         True   
boat                       False        False         False         True   
home.dest                  False        False         False        False   
age_?                      False        False         False         True   
age_dabl_continuous         True        False         False        False   
fare_?                     False        False         False        False   
fare_dabl_continuous        True        False         False        False   
body_?                     False        False         False         True   
body_dabl_continuous        True        False         False        False   

                       date  free_string  useless  
pclass                False        False    False  
survived              False        False    False  
name                  False         True    False  
sex                   False        False    False  
sibsp                 False        False    False  
parch                 False        False    False  
ticket                False         True    False  
cabin                 False         True    False  
embarked              False        False    False  
boat                  False        False    False  
home.dest             False         True    False  
age_?                 False        False    False  
age_dabl_continuous   False        False    False  
fare_?                False        False     True  
fare_dabl_continuous  False        False    False  
body_?                False        False    False  
body_dabl_continuous  False        False    False 
Target looks like classification
Linear Discriminant Analysis training set score: 0.578
 

Ah sweet! So data science, machine learning or data mining is 80% cleaning up the data. Take what you can get and go with it folks. dabl even informs us it appears the target method looks like a classification problem. As the name suggests, Classification means classifying the data on some grounds. It is a type of Supervised learning. In classification, the target column should be a Categorical column. If the target has only two categories like the one in the dataset above (Fit/Unfit), it’s called a Binary Classification Problem. When there are more than 2 categories, it’s a Multi-class Classification Problem. The “target” column is also called a “Class” in the Classification problem.

Now lets do some analysis. Yep we are just getting to some statistics. There are univariate and bivariate in this case.

Bivariate analysis is the simultaneous analysis of two variables. It explores the concept of the relationship between two variable whether there exists an association and the strength of this association or whether there are differences between two variables and the significance of these differences.

The main three types we will see here are:

  1. Categorical v/s Numerical 
  2. Numerical V/s Numerical
  3. Categorical V/s Categorical data

Also of note Linear Discriminant Analysis or LDA is a dimensionality reduction technique. It is used as a pre-processing step in machine learning. The goal of LDA is to project the features in higher dimensional space onto a lower-dimensional space in order to avoid the curse of dimensionality and also reduce resources and dimensional costs. The original technique was developed in the year 1936 by Ronald A. Fisher and was named Linear Discriminant or Fisher’s Discriminant Analysis. 

(NOTE there is another LDA (Latent Dirichlet Allocation which is used in Semantic Engineering that is quite different).

dabl.plot(titanic, 'survived')

In the following plots that auto-magically happens is continuous feature plots for discriminant analysis.

Continuous Feature PairPlots

In the plots you will also see PCA (Principle Component Analysis). PCA was invented in 1901 by Karl Pearson, as an analog of the principal axis theorem in mechanics; it was later independently developed and named by Harold Hotelling in the 1930s.  Depending on the field of application, it is also named the discrete Karhunen–Loève transform (KLT) in signal processing, the Hotelling transform in multivariate quality control, proper orthogonal decomposition (POD) in mechanical engineering. PCA is used extensively in many and my first usage of it was in 1993 for three-dimensional rendering of sound.

Discriminating PCA Directions

What is old is new again.

The main difference is that the Linear discriminant analysis is a supervised dimensionality reduction technique that also achieves classification of the data simultaneously. LDA focuses on finding a feature subspace that maximizes the separability between the groups. While Principal component analysis is an unsupervised Dimensionality reduction technique, it ignores the class label. PCA focuses on capturing the direction of maximum variation in the data set.

LDA

Both reduce the dimensionality of the dataset and make it more computationally resourceful. LDA and PCA both form a new set of components.

The last plot is categorical versus target.

So now lets try as dabl said a SimpleClassifier then fit the data to the line. (hey some machine learning!)

fc = dabl.SimpleClassifier(random_state=0)
X = titanic_clean.drop("survived", axis=1)
y = titanic_clean.survived
fc.fit(X, y) 

This should produce the following outputs with accuracy metrics:

Running DummyClassifier(random_state=0)
accuracy: 0.618 average_precision: 0.382 roc_auc: 0.500 recall_macro: 0.500 f1_macro: 0.382
=== new best DummyClassifier(random_state=0) (using recall_macro):
accuracy: 0.618 average_precision: 0.382 roc_auc: 0.500 recall_macro: 0.500 f1_macro: 0.382

Running GaussianNB()
accuracy: 0.970 average_precision: 0.975 roc_auc: 0.984 recall_macro: 0.964 f1_macro: 0.968
=== new best GaussianNB() (using recall_macro):
accuracy: 0.970 average_precision: 0.975 roc_auc: 0.984 recall_macro: 0.964 f1_macro: 0.968

Running MultinomialNB()
accuracy: 0.964 average_precision: 0.988 roc_auc: 0.990 recall_macro: 0.956 f1_macro: 0.961
Running DecisionTreeClassifier(class_weight='balanced', max_depth=1, random_state=0)
accuracy: 0.976 average_precision: 0.954 roc_auc: 0.971 recall_macro: 0.971 f1_macro: 0.974
=== new best DecisionTreeClassifier(class_weight='balanced', max_depth=1, random_state=0) (using recall_macro):
accuracy: 0.976 average_precision: 0.954 roc_auc: 0.971 recall_macro: 0.971 f1_macro: 0.974

Running DecisionTreeClassifier(class_weight='balanced', max_depth=5, random_state=0)
accuracy: 0.969 average_precision: 0.965 roc_auc: 0.983 recall_macro: 0.965 f1_macro: 0.967
Running DecisionTreeClassifier(class_weight='balanced', min_impurity_decrease=0.01,
                       random_state=0)
accuracy: 0.976 average_precision: 0.954 roc_auc: 0.971 recall_macro: 0.971 f1_macro: 0.974
Running LogisticRegression(C=0.1, class_weight='balanced', max_iter=1000,
                   random_state=0)
accuracy: 0.974 average_precision: 0.991 roc_auc: 0.993 recall_macro: 0.970 f1_macro: 0.972
Running LogisticRegression(C=1, class_weight='balanced', max_iter=1000, random_state=0)
accuracy: 0.975 average_precision: 0.991 roc_auc: 0.994 recall_macro: 0.971 f1_macro: 0.973

Best model:
DecisionTreeClassifier(class_weight='balanced', max_depth=1, random_state=0)
Best Scores:
accuracy: 0.976 average_precision: 0.954 roc_auc: 0.971 recall_macro: 0.971 f1_macro: 0.974

This actually calls the sklearn routines in aggregate. Looks like our old friend logistic regression works. keep it simple sam it ain’t gotta be complicated.

In conclusion, dabl is a highly recommended library for those looking to simplify their data analysis tasks. With its intuitive functions and visualizations, it provides a quick and easy way to perform data analysis, making it an ideal tool for both technical and non-technical user. Again, the real strength of dabl is in providing simple interfaces for data exploration. For more information:

dabl github. <- click here

Until Then,

#iwishyouwater <- hold your breath on a dive with my comrade at arms @corepaddleboards. great video and the clarity was astounding.

Muzak To Blog By: “Ballads For Two”, Chet Baker and Wolfgang Lackerschmid, trumpet meet vibraphone sparsity. The space between the note is where all of the action lives.

A Book Review – Scythe

Nice Robe

I am the blade that is swung by your hand,

Slicing a rainbow’s arc,

I am the clapper; but you are the bell,

Tolling the gathering dark.

If you are the singer, then I am the song,

A threnody, requiem dirge.

You’ve made me the answer for all the world’s need,

Humanity’s undying urge.

~ “Threnody,” from the collected works of H.S. Socrates

First as always i hope everyone is safe. Second, i hope everyone had an indulgent and superlative holiday season heading into the New Year! Third, i decided i wanted to write a book review since i haven’t in quite some time and given the number of books i have read recently figured hey lets do a book review!

This review deserves a little context. My middle progeny was assigned this book for a winter break reading assignment. i believe it is important to take an interest in your progenies’ activities and well reading is definitely one to promote and take interest. Thus when i was talking to her about what she was assigned, she said, “i think you will like this book.” She handed it to me, and i opened it to this page:

“It is the most difficult thing a person can be asked to do. And know what it is for the greater good doesn’t make it any easier. People used to die naturally. Old age used to be a terminal affliction, not a temporary state. There were invisible killers called “diseases” that broke the body down. Aging couldn’t be reversed, and there were accidents from which there was no return. Planes fell out from the sky. Cars actually crashed. There was pain, misery, and despair. It’s hard for most of us to imagine a world so unsafe, with dangers lurking in every unseen, unplanned corner. All of that is behind us now, and yet a single simple truth remains: People must die.”

~ From the gleaning journal of H.S. Currie

My daughter knows me well. So i said ok let us read it together but don’t think this is a race I’ll probably have this book finished in a week.

Ok this had my attention. So immediately i thought of Soylent Green meets Logan’s Run but there is a twist. In reading the back cover it paraphrases a world with no hunger, no disease, no war, no misery. Humanity has conquered all those things and has even conquered death. However, who are these scythes that are mentioned, and are the only ones who can “glean” life? So with the context out of the way let us get down to business.

The cover above depicts a Scythe. As most know or should know from Websters we have the following definition:

scythe (pronounced /sīT͟H/)

noun: a tool used for cutting crops such as grass or wheat, with a long curved blade at the end of a long pole attached to which are one or two short handles.

verb: cut with a scythe as in scythed.

Given many aspects of our so-called society today and social normalizations i believe this is a wonderful teenage adventure novel that sets the stage for some more esoteric readings in science fiction such as 1984, Something Wicked This Way Comes, Brave New World, Do Androids Dream Of Electric Sheep (DADOES), Snowcrash and Neuromancer.

The book’s premise is that humans now exist in a conflict-free world where human-kind have conquered death. The world they live in is a Post Age of Morality world where one no longer has true crimes against humanity; poverty is not an issue, and hunger is solved via synthetic food engineering. As such over-population has overrun Mother Earth and elected Scythes must cull the human population. This culling process is known in the vernacular as “gleaning”. The Age of Mortality is the duration of time before the scythedom, revival centers, and the Thunderhead were established.

To this end, artificial intelligence has been amplified via the “ThunderHead” which monitors, recommends, and predicts AllTheThings. As such, there is no need for the concept or construction of a government.

Tyger shrugged, “One Splat Too Many. They gave up. Now I am a ward of the ThunderHead.”

“I’m sorry Tyger”

“Hey don’t be. Believe it or not, the ThunderHead’s a better father than my father was. I get good advice now and get asked how my day was from someone who actually seems to care.”

Just like everything else about the ThunderHead its parenting skills were indisutable.

~ Apprentice Rowan

Two teens find themselves volunteered as apprentice-Scythes which leads to a world of corruption greed and the finality of death.

Scythes are volunteered as apprentices and taught the ways of all of the classics, philosophy, chemistry (poisons), neural linguistic programming (person-reading), and of course, skilled in all the ways one can end a person’s life or if you will extreme social engagement called “killcraft”.

Scyhtes choose which lives to glean based on statistics of past Age Of Morality morbidity rates and behaviors, social class, and ethnicities. They however cannot show bias.

Scythes are ruled by a worldwide committee and meet on a quarterly basis where concerns are raised, appretences are tested, and old friendships are renewed. Did i mention that humans now live indefinitely and can rewind physical age and appearance to no lower than 21? However, given that most Sychtes choose ages between 35-45.

The Scythes lived by the following commandments:

  1. Thou Shalt Kill
  2. Thou shalt kill with no bias, bigotry or malice of afterthought
  3. Thou shalt grant an annum of immunity to the beloved of those who accept your coming and to anyone else you deem worthy.
  4. Thou shalt kill the beloved of those who resist.
  5. Thou shalt serve humanity for the full span of thy days and thy family shall have immunity as recompense for as long as you live.
  6. Thou shalt lead an exemplary life in word and deed and keep a journal of each and every day.
  7. Thou shalt kill no scythe beyond thyself.
  8. Thou shalt claim no earthly possessions save thy robe, ring and journal.
  9. Thou shalt have neither spouse or spawn.
  10. Thou shalt be beholden to no laws beyond these.

So we must ask ourselves that if in fact we solve all the so called woes of the Human Condition will we solve the root cause of the Human Condition? If we take away mortality (and morality) and can save and upload our memories then what is meant to be Human? Passion and Lust (of life)? Is compassion still needed?

Upon giving me the book to read my daughter laughed and said “Daddy maybe you are one.”

Then again, reflecting on what my daughter said to me when she was referencing the text, at the core maybe we all are Sycthes.

So if your in the market for a good book for your children or you just want a quick read that will be a good catalyst for your thoughts for our future, pick this book up. Here i even will provide the link to the ThunderHead Book Club In The Sky. Note: this is book one of a triology.

Until Then,

#iwishyouwater <- some footage from the recent 50 year storm on the left coast.

@tctjr

Muzak To Blog By: Tchaikovsky’s Symphony No. 6 in B minor, Valery Abisalovich Gergiev conducting the Vienna Philharmonic. Spectacular piece Symphony No. 6 in B minor, Op. 74, also known as the Pathétique Symphony (a.k.a. The Passionate Symphony). I recently got to see this performed by the Charleston Symphony with Jonathan Heyward conducting it was spectacular. I was sitting there thinking how someone who has certain sexual proclivities or other passions in their life that at the time were not tolerated in society could create such a work of art; then again, it just goes to show the extreme lengths humans will go to make their true passions as it were, incarnate. i also think it very ironic that this composer would probably not trend in the position of Tchaikovsky due to his political beliefs, but one never knows, does one?