Sunday, July 7, 2013

Markov Convergence Theorem

Assumptions for Convergence

A1: Finite states
A2: Fixed transition probabilities
A3: Can eventually get from any one state to any other
A4: Not a simple cycle (not automatic state changes)

Given A1-A4, a Markov process converges to an equilibrium distribution which is unique.

Implications

  • The initial state doesn't matter
  • History doesn't matter
  • Interventions doesn't matter
    • Is this the systemic structural property that prevents diets from succeeding?

Things to Remember

  • It could take a long time to reach the equilibrium
  • The point of intervention is by changing A2, by changing the transition probabilities
  • Changing state: temporary; Changing transition probabilities: permanent

How to use Models

How to use models

1. Start with a simple model (e.g. alert/bored model for Markov processes)
2. Understand the mechanics of the simple model
3. Understand how the simple model scales with more dimensions (e.g. 3 states instead of 2)
4. Apply the model to real problems with more dimensions (e.g. democratization problem)
5. Use real data and get a deeper understanding of how the model works
6. See if counter-intuitive results emerge

Reference:

  • Lecture 10.3 Markov Model of Democratization

Seeing Through the Lens of Markov Processes

"That's a Markov process"
What would it be like if we see the world through the lens of Markov processes?

What's a Markov process?

Two mild conditions:
  1. Finite set of states
  2. Stable transition probabilities
  3. Members can move from one state to another
Under those two conditions, the Markov Convergence Theorem says that there will be statistical equilibrium such that the number of members in each state remains the same even though there is churn.

How to determine the Markov Equilibrium?

Build the Markov Transition Matrix and solve for the equilibrium.

A Notion of "Better"

A notion of better

Faster, cheaper, better.How do we determine when a method/procedure/solution is "better"?
It is relatively easy to measure faster, cheaper but it's harder to measure better.

This is not simple idle thinking but it does lead to some life changing behaviours.

Less is better

Two concrete examples of better: Everything and Launchy (use version 1.25)
Everything is a tool that locates files and folders by name. It is an essential tool for me, yet a close friend of mine does not use it.
Launchy is another tool I use - as a calculator and a launcher. I probably use it 100 times a day, yet my close friend does not use it - even after I've demonstrated what it does.

I conclude that everyone has a different notion of better.

By using launchy, I've replaced the need to use the mouse to click the Start > Program > Folder > Shortcut with some quick key presses. A task that took 5 seconds now takes 0.5 seconds - an order of magnitude improvement. That's better.
But to get to that, it required some initial investment - setting up the launchy, understanding how it works and what it does and how to get the most out of it. But it is worth it.

Condensed is better

Proverbs and wise sayings are condensed wisdom of the ages. A few carefully selected words are better than a length essay.
There is value is condensing an entire topic into a few words. It may be that we need to first read the entire topic but the condensed words will quickly remind us of what is important.

Two quotes are relevant here:
He is the most useful teacher who condenses the most knowledge into short sentences, that are easily remembered and applied ~Samuel Johnson
The writer helps us the most who gives us the most knowledge, and takes from us the least time ~Sidney Smith

Visual is better

In a lecture on Nash Equilibrium, a textual description of the procedure to find the Nash Equilibrium was presented. Later in the discussion forum, two students described visual versions of the procedure which many of us found simpler and more intuitive.

Another takeaway from this will be simple is better and comprehensible is better.

The big idea

Minimal, condensed visuals are better.

Saturday, July 6, 2013

Setup Samba

On the Server

1. Edit /etc/samba/smb.conf
[sharename]
    comment = Share
    path = /path/to/shared_path
    writable = yes 


2. Restart samba server
sudo service smbd restart

Reference:

Change the origin of git repo

If the origin already exists, you can point to another repo as follows:
  git remote set-url origin git@github.com:username/repo.git 

If you've initialized a local repo and want to push to github, do the following:
  git remote add origin git@github.com:hoekit/vimrc.git
  git pull origin master
  git push --set-upstream origin master

Monday, July 1, 2013

A Musical Life - Project Submission for "Creative Programming for Digital Media & Mobile Apps"

A Musical Life

A Colorful Life blends the graphical elements of SonicPainter and John Conway's Game of Life ((http://en.wikipedia.org/wiki/Conway's_Game_of_Life)) to produce a fun and intriguing form of entertainment.

User interaction is rather intuitive:
  1. Users "give life" to cells by dragging the mouse over them.
  2. Once the mouse is released, the Game of Life plays on automatically
  3. The speed of the game can be changed by moving the mouse left (slower) and right (faster).
Video below shows a sample session of A Musical Life.
[Update: Go to http://www.firexis.com/processing/a_musical_life/ for an interactive version without the music - for some reason Javascript version kills the audio.]



Next on todo list is to publish the Javascript version so users can interact with it. -- Done!
Get the code from https://github.com/hoekit/a-musical-life.