Home » Author Archives: Mark Needham (page 2)

Author Archives: Mark Needham

R: Removing for loops

software-development-2-logo

In my last blog post I showed the translation of a likelihood function from Think Bayes into R and in my first attempt at this function I used a couple of nested for loops. likelihoods = function(names, mixes, observations) { scores = rep(1, length(names)) names(scores) = names   for(name in names) { for(observation in observations) { scores[name] = scores[name] * ...

Read More »

Spark: Generating CSV files to import into Neo4j

apache-spark-logo

About a year ago Ian pointed me at a Chicago Crime data set which seemed like a good fit for Neo4j and after much procrastination I’ve finally got around to importing it. The data set covers crimes committed from 2001 until now. It contains around 4 million crimes and meta data around those crimes such as the location, type of ...

Read More »

R: Snakes and ladders markov chain

software-development-2-logo

A few days ago I read a really cool blog post explaining how Markov chains can be used to model the possible state transitions in a game of snakes and ladders, a use of Markov chains I hadn’t even thought of! While the example is very helpful for understanding the concept, my understanding of the code is that it works ...

Read More »

Neo4j: The learning to cycle dependency graph

neo4j-logo

Over the past couple of weeks I’ve been reading about skill building and the break down of skills into more manageable chunks, and recently had a chance to break down the skills required to learn to cycle. I initially sketched out the skill progression but quickly realised I had drawn a dependency graph and thought that putting it into Neo4j ...

Read More »

Neo4j: Generating real time recommendations with Cypher

neo4j-logo

One of the most common uses of Neo4j is for building real time recommendation engines and a common theme is that they make use of lots of different bits of data to come up with an interesting recommendation. For example in this video Amanda shows how dating websites build real time recommendation engines by starting with social connections and then ...

Read More »

InetAddressImpl#lookupAllHostAddr slow/hangs

java-logo

Since I upgraded to Yosemite I’ve noticed that attempts to resolve localhost on my home network have been taking ages (sometimes over a minute) so I thought I’d try and work out why. This is what my initial /etc/hosts file looked like based on the assumption that my machine’s hostname was teetotal: $ cat /etc/hosts ## # Host Database # ...

Read More »

Topic Modelling: Working out the optimal number of topics

software-development-2-logo

In my continued exploration of topic modelling I came across The Programming Historian blog and a post showing how to derive topics from a corpus using the Java library mallet. The instructions on the blog make it very easy to get up and running but as with other libraries I’ve used, you have to specify how many topics the corpus ...

Read More »

Neo4j: TF/IDF (and variants) with cypher

neo4j-logo

A few weeks ago I wrote a blog post on running TF/IDF over HIMYM transcripts using scikit-learn to find the most important phrases by episode and afterwards I was curious how difficult it’d be to do in Neo4j. I started by translating one of wikipedia’s TF/IDF examples to cypher to see what the algorithm would look like:       ...

Read More »

R: Weather vs attendance at NoSQL meetups

software-development-2-logo

A few weeks ago I came across a tweet by Sean Taylor asking for a weather data set with a few years worth of recording and I was surprised to learn that R already has such a thing – the weatherData package. Winner is: @UTVilla! library(weatherData) df <- getWeatherForYear(“SFO”, 2013) ggplot(df, aes(x=Date, y = Mean_TemperatureF)) + geom_line() — Sean J. ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close