Drawing graphs

https://askubuntu.com/questions/917030/how-to-install-pydot-and-graphviz

 

Notice how nice some of the graphs are in textbooks (for example, from AIMA 3rd ed.)?

Screen Shot 2015-07-09 at 3.56.52 PM

Well you could draw them too with graphviz (dot language).

network

Get dot here http://www.graphviz.org/Download..php

And generate the above graph by putting this in a file, e.g. simple_neural_network_diagram.dot

digraph G {
rankdir=LR
splines=line
node [fixedsize=true, label=""];
subgraph cluster_0 {
color=white;
node [style=solid,color=blue4, shape=circle];
x1 x2 x3;
label = "layer 1 (Input layer)";
}
subgraph cluster_1 {
color=white;
node [style=solid,color=red2, shape=circle];
a12 a22 a32;
label = "layer 2 (hidden layer)";
}
subgraph cluster_2 {
color=white;
node [style=solid,color=seagreen2, shape=circle];
O;
label="layer 3 (output layer)";
}
x1 -> a12;
x1 -> a22;
x1 -> a32;
x2 -> a12;
x2 -> a22;
x2 -> a32;
x3 -> a12;
x3 -> a22;
x3 -> a32;
a12 -> O
a22 -> O
a32 -> O
}

And generate it

dot -Tpng simple_neural_network_diagram.dot -o network.png

Types of code commenting

In the chapter on commenting, McConnell divides comments into six categories. Figure 3.1 gives summarized versions of his definitions, with some of his commentary.

  • Repeat of the code: States what the code does in different words. Just more to read.
  • Explanation of the code: Explains complicated, tricky, or sensitive code. Make the code clearer instead.
  • Marker in the code: Identifies unfinished work. Not intended to be left in the completed code.
  • Summary of the code: Distills a block of code into one or two sentences. Such comments are useful for quick scanning.
  • Description of the code’s intent: Explains the purpose of a section of code, more at the level of the problem than at the level of the solution.
  • Information that cannot possibly be expressed by the code itself : Copyright notices, confidentiality notices, pointers to external documentation, etc.

Why I Think Now Is A Good Time For Machine Learning

As we all know, since the mid 18th century, when the scientific methods were established, we have gone through a few technological revolutions. Most recently it was the industrialization revolution, and now information is the current revolution. The availability of information is more noticeable with the decreasing cost of storage. Now it is easy to acquire large amount of information; what to do with it is the question. The answer is machine learning. To participate in the information era, you can start off learning about machine learning.

Learning machine learning has a few benefits, which I’ll talk about.

  1. There are patterns in the large quantity of data, but it is infeasible for humans to analyze.
  2. Success = Opportunity + Preparation. And there are lots of opportunities. We need the preparation.

Clearly, it is in your favour to study machine learning, so you too can develop the necessary tools to deal with large amount of data. In other words, the availability very large data sets is one of the resources fuelling the information revolution. It seems obvious that being able to utilize this information is key to being part of the current information era.

/more to come

January 2015 Thoughts

Went to talk with Professor Richard Mann. He suggested some readings based on what I was reading (On Intelligence) and what I was interested in.
1/ Thinking Fast & Slow on AI by Daniel KAHNEMAN. Covers theory of choice, preferences, attention.
2/ The Black Swan: Impact of the Highly Improbable by TALEB.
3/ Scientific Discovery by Paul THAGARD, professor at uWaterloo.
4/ How to Build a Brain by Chris ELIASMITH
5/ Computer Vision by Richard SZELISKI

While reading “On Intelligence” I had a thought. Is being tired just the result of neurons firing so much that they need to recharge? Since being out of the electrochemical signalers (used up faster than it naturally regenerates). This would explain why you get tired of a certain activity after intensive use of those neurons. For example, studying… after a while, you lose ability to focus.

Upon going to DC library I remembered the UW Police could track stolen MACs. So there was an idea, good for a startup (if nothing like it already exists): Stolen Goods Network Tracking Down Organization.
– All devices have MAC address and use it to connect to a network.
– Reported stolen goods with police has its MAC marked stolen.
– Partnered networks (e.g. McDonald’s free wifi) matches stolen MACs, and reports and monitors activity to local police.
– Police tracks and recovers stolen goods. (This part flaky.)

On the Information Age

To say we live in interesting times would be a vast understatement. Trying to keep up with the technological advances made is a job in itself. We are exposed to a huge amount of content, causing us to feel overwhelmed and frustrated; too much data can drag us back into the very same inertia we would be experiencing if there was absolutely nothing of interest going on.

We are at a pivotal point in history where we have an abundance of access to technology. Many of us are having trouble coming to terms with that. There is simply too much to do, an unlimited amount of potential. In a way, it can be easier to be forced down a narrow path than to figure out how to traverse down a huge boulevard. That is why we cannot be afraid to make mistakes and false starts as we refine our talents.

In computer science talk, technology has given us a large amount of edges per node (and this is greater than any point in our history), and our best choice to traverse down this exponentially large tree is do breadth first search with heuristics.

The learning process has changed on virtually every level and the old rules just don’t apply anymore. Rather than wait for someone to issue new rules, we need to plunge into our own era of experimentation and innovation and shape it for our own purposes of expression.

As easy and accessible as technology has made things, actual skill remains an achievement that can’t be bought or even given away. Social media has been known to drag people down to pits of trivia and irrelevance, wasting vast amounts of valuable time, potentially causing us to lose privacy and lose basic social skills. But social media can also be an invaluable resource if we /choose/ to use it in that way. Social media is a tool that has great potential, if it got people to think and to see results. People have tremendous potential power and most people don’t even realize it. This is precisely why governments in every country keep tight control over these new outlets, for example.

The abundance access to technology (and thus increased productivity) means as an individual, we are more empowered than ever – whether we work individually or in groups. As hackers, we generally like to explore our own interests and take our own paths. Writing from our own perspective is essential, but there is also strength in numbers. In groups, there are varieties of opinions and even disagreements, which, contrary to the belief of many, only serve to strengthen and help define the basic premise of the cause we are united on. In both cases, our skill and experience matters more than ever, as these technological tools can be leveraged to more devastating effects in their hands. The list of social media tools available today is huge, but the issue of skill and experience are just as relevant and vital as they’ve ever been.

Look forward to the explosion of creativity and productivity ahead in our new age.

Note: Contents in this post is inspired by 2600 The Hacker Quarterly Volume Thirty-One, Number Four, article title “Tools for a New Future”.