Posts Tagged tutorial
Genetic Algorithm Examples
Posted by Howard Yeend in machine learning on March 3, 2011
There’s been a lot of buzz recently on reddit and HN about genetic algorithms. Some impressive new demos have surfaced and I’d like to take this opportunity to review some of the cool things people have done with genetic algorithms, a fascinating subfield of evolutionary computing / machine learning (which is itself a part of the broader study of artificial intelligence (ah how academics love to classify things (and nest parentheses (especially computer scientists)))).
If you’re new to genetic algorithms, don’t be put off by the awesome/scary name – you might like to check out my own modest contribution to the field of abusing science to make cool useless things; the hello world genetic algorithm tutorial. It’s written as a short genetic algorithm tutorial to help beginners understand genetic algorithms from the ground up (and it has a pretty interactive demo in JavaScript too!).
So here’s my top five evolutionary scripts:
Read the rest of this entry »
The K-Means Clustering Machine Learning Algorithm
Posted by Howard Yeend in machine learning on January 24, 2010
The k-means clustering algorithm is one of the simplest unsupervised machine learning algorithms, which can be used to automatically recognise groups of similar points in data without any human intervention or training.
The first step is to represent the data you want to group as points in an n-dimensional space, where n is the number of attributes the data have. For simplicity let’s assume we just want to group the ages of visitors to a website – a one-dimensional space. Let’s assume the set of ages is as follows:
{15,15,16,19,19,20,20,21,22,28,35,40,41,42,43,44,60,61,65}
Now there are a number of ways we could separate these points out; one obvious way that springs to mind is simply to iterate over the set and find the largest gap between adjacent ages. For some sets this can work quite nicely, but in our case it would give us quite unbalanced groups; 15-44 and 60-65, the latter containing just 3 points, and the former being far too broadly distributed.
Using k-means clustering we can obtain more tightly defined groups; consider the set {1,2,3,5,6,9} – using the simplistic greatest distance technique we gain two sets {1,2,3,5,6} and {9}, while the k-means algorithm produces a grouping of {1,2,3} and {5,6,9} – more cohesive clusters with less dispersion of points inside the groups – k-means tries to minimise the sum of squares within a cluster:
Notice how in the first set of clusters the outermost points of the first cluster are quite far away from the middle of the cluster, while in the second set, the points in both clusters are closer the center of their groups; making these clusters more well-defined, less sparsely populated.
Now let’s have a look at the algorithm and work through the example age data to see if we can get a tighter grouping than 15-44 and 60-65 using clustering:
Facebook Chat Smilies
Posted by Howard Yeend in web on December 3, 2009
After the runaway success of my facebook chat history video (45k views, 100 ratings on youtube) I thought I’d follow up with a video explaining all the chat emotes you can use in facebook. There are some cool emoticons there.
Read the rest of this entry »
HTTP Headers
Posted by Howard Yeend in networking, Other Code on February 1, 2009
An article about sending HTTP headers to a remote system, and knowing fully what they mean. Also covers sessions, hosting, and various interesting bits and bobs relating to web application security, hacking and the web in general. Read the rest of this entry »
Setting up a WAMP Server by hand
Posted by Howard Yeend in Apache on January 15, 2009
This article will step through what you need to do get WAMP (Windows, Apache, mySQL, PHP) running on windows 2000, 98 or XP. (It might work with Vista, ME or 95, but I don’t promise anything)
By the end, you’ll have a versatile tool that will allow you to:
-host your own website (permanent internet connection preferable)
-learn a basic programming language (PHP)
-learn about relational databases (mySQL)
-learn about server config on the industry standard webserver (apache)
all without having to install a new operating system.
How To Hack – Beginners Guide to Hacking Computers
Posted by Howard Yeend in hacking on December 1, 2004
“ The Only True Guide to Learning How to Hack â€
originally by R4di4tion , with a few updates by myself.
You stay up all night on the PC typing and typing. No, you’re not hacking. You’re begging someone on IRC to teach you how to hack! Let’s look at the facts:
- You’re a luser and you’re annoying. No one likes you if you ask others how to hack without taking the least amount of initiative.
- You’re not worthy of any title even resembling hacker, cracker, phreaker, etc., so don’t go around calling yourself that! The more you do, the less likely you are to find someone willing to teach you how to hack (which is an infinitesimal chance, any way).
- You’re wasting your time (if you couldn’t infer that in the first place). Many real hackers (not those shitty script kiddies) spend all their insomniac hours reading and, yes even, HACKING! (Hacking doesn’t necessarily (but usually does) mean breaking into another system. It could mean just working on your own system, BUT NOT WINDOWS ’9x (unless you’re doing some really menacing registry shit, in which case, you’re kind of cool).)
Recent Comments