Kai Staats: writing

A Breakfast for the Body and Brain

Breakfast by Kai Staats

For me, exercise and breakfast set the day in motion. They determine, in some ways, how successful I will be at accomplishing my goals. Therefore, I look forward to each and embrace them as serious fun.

  1. Wake shortly after sunrise.
  2. Glance over the railing at the end of the walkway to determine if the surf is good or a pass day. Change into my running shorts or wetsuit then head down to the beach.
  3. 7.5km, to the second estuary and back again, or surf.
  4. Return to my flat, shower, and change into my attire for the day.
  5. Fire up the computer, music that fits the day (anything from Bach to Enya or Fleetwood Mac, Aretha Franklin to George Winston to Styx).
  6. Fix breakfast and read a science journal or novel while eating.
  7. Check email, code, research, research, research …

Breakfast by Kai Staats Today I prepared a fruit smoothie from a half dozen small ice cubes, juice oranges, apple, avocado, handful of dates, ginger and honey. I cook the onions, garlic, and chilli pepper with 4 eggs in a skillet, topped by mushrooms and tomatoes sautéed in unsalted butter and shredded cheese. Prep to consumption: less than thirty minutes including cleaning, doing dishes as I go. If I prep a few items the night before, a quarter of an hour total.

Delicious, nutritious, filling and grounding.

It does not take a scientific research study to draw the connection between how we fuel our bodies and how our bodies and minds function. Rather, we need to be reminded of what not long ago came more naturally, when our lives were not so fast-paced, when food preparation was a time to prepare for our day.

Everything you see came from the Ethical Co-Op. Not as pretty as the greenhouse ripened, chemically treated, and wax coated fruits and veggies found in the super market, but that’s the point—this is food before marketing decided it should be shiny, BIG, sweet and fun. Many of us have forgotten that food grows in soil. It is wrinkled, imperfect, and delicious in ways an entire generation has never enjoyed.

Our bodies are nothing more than an expression of what we put in. If we expect a cardboard box, a shrink-wrapped styrofoam tray, or a heavily processed “healthy-start breakfast bar” to replace the real thing, we are a victims of advertising designed to sell nothing more than a chemically engineered product made to look like food and sit on the shelf without going bad such that neither the distributor nor the retailer will report lost income to food gone bad.

In the past fifty years, in the lifetime of my parents, we have gone from carrying canvas bags to and from a small, locally owned market to the expectation that everything we consume comes in a box, plastic bag, carton, or container whose sole function is catching our attention on the shelf, and subsequent, easy transportation to our homes where we quickly discard the packaging.

I often consider the fossil fuel and raw materials consumed to package modern food. Farmed trees cut, transported, shredded, pulped, bleached, stabilised, rolled into paper and cardboard then trimmed, printed, and glued into a box to hold what may be consumed in a single meal. Every plastic container began as a fossil fuel formed 300-500 million years ago. Carbon, trapped deep in the Earth released and processed through the complex, power consumptive process of refining, manufacturing, and distribution in order that we can have four, maybe five spoonfuls of yoghurt or quickly unwrap a breakfast burrito on our way out the door.

This is nothing less than insane! Yet, it has become the norm.

Surely, there is a means to return to a life in which we are closer to our food, making clear our consumer preferences through how we spend our dollars and rand. We can visit local farms, and learn how modern farmers struggle and succeed. We can join farming cooperatives, tend to a community garden one afternoon each month. We can grow tomatoes, peppers, and herbs on window sills and balconies, in the narrow spaces between our homes.

We can return to a breakfast that is as enjoyable to prepare as it is to consume, and rest assured we have engaged in a practice that supports a sustainable mind, body, environment and soul.

By |2017-04-10T11:17:31-04:00October 21st, 2015|2015, Out of Africa, The Written|Comments Off on A Breakfast for the Body and Brain

The Return of the Dolphins

Two hundred meters from shore, the subtle undulation of the swell raises and lowers my board, my body half immersed in the cool embrace of False Bay. In the early morning light filtered by a thin mist, diminishing silhouettes speak excitedly. I hear someone shout. Three dozen surfers to my left and right spin their boards away from shore as sleek, black bodies rise against the horizon, quickly slipping below the surface again. Even at twenty meters distance, the site of dolphins is breathtaking.

Some paddle out further. Other sit tall, watching, waiting … hoping. A few are lucky to come within just a few meters of the passing dolphins, to be in the path of these curious creatures. More than once, the dolphins come up just parallel to a surfer, looking briefly before submerging and passing beneath the board. I was told later that if you jump off your board, and just float in the water, you may be so lucky as to be nudged. A test? An invitation?

One passes a half dozen meters from me, and I am deeply moved.

Both times I have experience this, I find unexpected emotion welling up inside, my breath caught on the verge of tears. I do not hold belief these are super intelligent creatures, for little in our study of them says they are more or less than what is needed to survive in their domain. But raw beauty, even if only an interpretation in the human mind, moves me in a magical way.

The next day there were whales breaching a few kilometers off shore, and the third day, seals riding the waves just to the sides of our boards. What a gift, to share this medium with our distant relatives, mammals in various forms.

By |2015-11-07T03:30:34-04:00October 10th, 2015|2015, Out of Africa|Comments Off on The Return of the Dolphins

GP update 2015 10/02

(email to my fellow researchers)

This week has come and gone quickly. I have been to SKA four times, including a week ago Friday. The pace of my work differs now, as my data runs are a minimum of 5-6 hours, but more recently 50+ hours as I push GP to 50 generations of 100-200 Trees against 10,000 lines of features.

I arrive. Log on. Run each accomplished tree against the TEST data. Save the results in my diary. Archive the trees. Mod parameters. Start a new run. Two hours in commute for an hour of work. Sounds like living in San Fran, not Muizenberg.

So far, very good! No glitches in my software. Not a single crash (except when Nadeem accidentally killed Karoo GP 35 gens into a 50 gen run, trying to kill zombies at my request. Silly us! You can’t kill zombies, they’re already dead! I know, old UNIX joke, but it’s still funny :) The multi-core is solid and linear scaling on the 40 core box. The server version (configuration file + single line execution) works well for repeat runs.

I have conducted four full runs, with the fifth now in progress. Keeping a diary of the results, including the Precision / Recall against the TREE ID and it’s polynomial expression. What’s more, every tree is saved in a .csv file at the end of each Generation. Even when Karoo was terminated accidentally, nothing lost.

Now, I need to write a script which loads a .csv and runs with it, as a total population seed (common according to the literature). The continue function is already in place, so just need to slip a loaded list of arrays into population_a and cont.

Consistently, I am seeing 82-86% Precision (in a 50/50 dual class feature set) with Recall just a few points below. I need to look at AUC and one other analysis (rcm by Thuso; can’t recall the name) to get a full understanding of how Karoo is doing.

Ok. Back to work …

By |2017-11-24T23:44:43-04:00October 2nd, 2015|Ramblings of a Researcher|Comments Off on GP update 2015 10/02

The Waters of Mars

water on Mars by NASA

(photo courtesy of NASA)

The race for space began with fear that one of our kind might leave home before the other and gain a military advantage. It was not an expedition but a political decision to fuel the Saturn V rockets that carried our species further than ever before.

Four decades later, we have advanced our technology such that each of us carries in our pockets more computational power than all of NASA at the time of the Apollo program, yet we remain grounded, the International Space Station the only reminder of a time when we believed we would inherit the stars.

In my lifetime, humans have walked on the moon and orbited the Earth countless thousands of times. But I must ask without confidence, Will I live to see humans walk on the surface of the Moon again? Will we lay hammer to the rocky surface of an asteroid or sample the flowing waters on Mars?

With the British Interplanetary Society, Icarus Interstellar, and the Initiative for Interstellar Studies thought leaders are helping to put words to thought, and designs to words. The Planetary Society continues to lead with real spacecraft moving into interplanetary trajectories, even into interstellar space.

With NASA’s bold declaration of water on the surface of Mars, perhaps, finally, the dead centre will be shifted to an edge over which politicians without the power of imagination but with the power of economic control will be forced to follow.

Maybe then we will be made aware not of what makes us different, but what unites us under a common goal.

Exploration. Discovery. The unknown.

By |2015-10-06T23:11:40-04:00September 29th, 2015|Looking up!|Comments Off on The Waters of Mars

When the Moon Turns Red

Lunar Eclipse 2015 by Kai Staats
Lunar Eclipse 2015 by Kai Staats Lunar Eclipse 2015 by Kai Staats

The photographs were obtained between 3:15 and 4:20 am, in Muizenberg, Cape Town, South Africa. The cloud cover came and went, at times totally blocking the view. Unfortunately, as the Moon neared totality, the mist was heavy (thus the soft image). The final shot of the Moon resting on the adjacent building was only seconds after the clouds dissipated one last time. Totality was missed from this vantage point, but the total experience was mesmerising.

Canon 60D
Nikor 80-200mm lens (circa 1980) with Nikon/Canon adapter
ISO: 400 – 1000
Exposure: 1/200 – 2 seconds

By |2017-04-10T11:17:32-04:00September 28th, 2015|2015, Looking up!, Out of Africa|Comments Off on When the Moon Turns Red

GP update 2015 09/25

(email to my fellow researchers)

Today marked the first official day of Karoo GP processing KAT7 data.

My first run was with depth 5 trees against 10,000 lines of data with 5 features. The multi-core functionality saved my recursive ass as the first 10 generations of 100 trees took just over 5 hours to process.

In the end of this minimisation function, there were 3 trees presented as having the best fitness, 2 of which shared the same polynomial expression. I think that is a good sign, but not certain yet.

Precision was 86% for both. Recall quite a bit less.

I sent the first run back into another 20 generations (a new feature I added to Karoo GP this week which allows you to continue the evolution indefinitely), and started another run with the same settings, to see if it converges on anything close to the first set of equations.

Will find out on Monday …

kai

By |2017-11-24T23:44:49-04:00September 25th, 2015|Ramblings of a Researcher|Comments Off on GP update 2015 09/25

Lost days

Sometimes I spend an entire day searching for a place to work.

I venture to two or three cafes.

The first is too noisy, with traffic, construction, and trains screaming by.

I order a drink and dessert at the next only to learn the wi-fi is intermittent, at best, twenty minutes lost trying to connect. I do what I can off-line.

The final stop and I find a cozy, relatively quiet corner only to realise there is no power and my laptop has but 12% battery remaining.

I know. It sounds silly to complain about such things, for life is far more dynamic than this. But when what I do requires that I am on-line, days like today are days lost to a modern quagmire.

By |2015-10-06T23:20:45-04:00September 23rd, 2015|Critical Thinker, Humans & Technology|Comments Off on Lost days

GP update 2015 09/13

(email to my fellow researchers)

My classification TEST suite is complete, producing Accuracy, Precision, and Recall scores on associated trees.

I have a very basic evaluation built for the Abs Value (minimization) function. Not really sure what one usually uses to test one of these, other than comparing the distance from the known solution to the produced result.

Spent a few hours dealing with a ‘zoo’ (Pythonic nomenclature for “divide by zero”). Seems SymPy is willing to carry divide-by-zero functions as long as you don’t attempt to process them as a float. Then it freaks out. So, I had to intercept the polynomial processing with a str() test for ‘zoo’.

Anyone ever tried a Google search for “python zoo”?

Finally, I need to apply the sklearn split function across my data. The framework is in place (already modified the way the data is passed through the entire script to accommodate both TRAINING and TEST).

Should be easy. (stupid last words)

kai

By |2017-11-24T23:44:56-04:00September 13th, 2015|Ramblings of a Researcher|Comments Off on GP update 2015 09/13

Normalisation is abnormal

(sitting at AIMS)

From 10 am till 2 pm, this is what I built. Argh! Should not have been so hard.

def fx_normalize(self, array):
norm = []
array_min = np.min(array)
array_max = np.max(array)

for col in range(1, len(array) + 1):
n = float((array[col – 1] – array_min) / (array_max – array_min))
norm = np.append(norm, n)

return norm

… but now, my function appears completely different, the curve of the line gone. Is it just the scale? Yes, further testing confirms this. Good.

Now I will return to my work with Accuracy, Precision, and Recall.

By |2017-11-24T23:45:04-04:00September 10th, 2015|Ramblings of a Researcher|Comments Off on Normalisation is abnormal

Frustration in the easy things

(sitting at SAAO)

Per my work at SKA yesterday, I learned to use matplotlib to produce 3D plots of my functions in combination with a scatterplot of the Iris features. I was hoping to automate the solving for any given variable using Sympy, but have not found a means to that end. For now, I will manually reform each algebraic expression. Not ideal, but I need to move ahead. Spent too much time on this already.

I recognise that plotting is core to any modern research. I feel far behind, but know I will come up to speed quickly. Between the older gnuplot, matplotlib, and sympy’s plot functions, there are myriad approaches (too many, in fact).

As I have many times experienced over the past year, every day I am humbled by the challenge of learning something new, and at the same time rewarded by the same. Each day feels incremental, but when I look back to my very first line of Python a little over a year ago, and now, over 2500 lines of Object Oriented, multi-core code with a home-built Numpy array management system, yeah, I’ve learned a ton.

By |2017-11-24T23:45:11-04:00September 9th, 2015|Ramblings of a Researcher|Comments Off on Frustration in the easy things
Go to Top