Code of my ClojuTRE 2018 talk
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
resources
src/correlate
.gitignore
LICENSE.md
README.md
project.clj

README.md

correlate

The aim of this project was to find out how activities influence my mental focus.

Talk

This was the underlying code for my talk at ClojuTRE 2018 titled Optimizing My Mental Focus with Machine Learning and Clojure.

What?

Mental focus was hard to define, so I tracked "Brain Fog" instead, basically tracking my mental un-focus. It's easier to ask yourself "How foggy do I feel today?" instead of "How focussed do I feel today?", at least for me.

Activities can be anything. In my case, I mainly tracked my food because I had this theory (the "Kebab Theory") that certain foods made me feel less focused the next day, especially Kebabs.

Why?

I saw this great project for analyzing weight loss data with vowpal-wabbit in the hope of finding out which factors influence weight loss (and weight gain) and tried to apply a similar approach to mental focus while using Clojure.

How?

Simple:

  1. Collect data
  2. Parse it
  3. Shove it into vowpal-wabbit
  4. Get results and hope you understand them.

Let's go through these steps in detail:

1. Collect data

Here's my Google Sheets template.

entering data into Google Sheets

I used Google Sheets for collecting data. Put simply, you enter all relevant data into the spreadsheet. There are two types of data: Events and Measurements. Events never have values (no value in the value column) whereas Measurements often do.

Measurements are things which matter to you. In my case, my Brain Fog. I would grade it on a subjective scale of 0 (no fog, very focused) to 5 (feeling foggy and unfocused). Further, I would do a Stroop Test every morning which yields some numerical values (time in seconds to complete the test) which I would also enter in the value column.

Check out the template (see above) for some example values.

Protip: +Option+Shift+; (on macOS) inserts the current datetime into Google Sheets (select a cell first). Check out Help --> Keyboard Shortcuts and search for "date" if you're on another operating system.

2., 3. and 4.: Check out the tutorial!

I created a tutorial located in src/correlate/tutorial.clj!

Important! Do these things first:

Install Vowpal-Wabbit (here on macOS, check the site for more info for your platform):

brew install vowpal-wabbit

Clone this repository:

git clone https://github.com/olieidel/correlate.git

Go to directory and install dependencies:

cd correlate
lein deps

Finally, fire up your REPL of choice and navigate to src/correlate/tutorial.clj :)

Random

The code I presented at my talk can be found in the file src/correlate/clojutre_talk.clj.

Feel free to reach out to me if things are unclear! :)

License

Copyright © 2018 Oliver Eidel

Licensed under the MIT License.