Posted: December 20th, 2009 | Author: David | Filed under: Programming | Tags: api, httpservletrequest, java, reference | No Comments »
For such a core object the HttpServletRequest javadoc is a little lacking in the Examples Dept. when it comes to documented output. With various methods returning various parts of URLs, it’s often easy to pick the wrong one, so I thought I’d knock up a little table with the getters which trip me up sometimes. Read the rest of this entry »
Posted: April 14th, 2009 | Author: David | Filed under: Programming | Tags: url java apache http | No Comments »
After much fussing about, I’ve found out that the default UrlConnection object in the core Java libraries doesn’t correctly obey connect or read timeouts set via the setConnectTimeout() or setReadTimeout() methods. The only way I’ve managed to get this to work, is to add the following arguments to the JVM. Read the rest of this entry »
Posted: February 9th, 2009 | Author: David | Filed under: Food | Tags: chicken, chicken stew, dumplings, recipe, stew | No Comments »
This is a bit of a hybrid recipe inspired from a bit of a Nigella and a bit of one of the anonymous cookbooks I’ve got hanging about. I’m proud to say that the dumplings were all my addition, although I didn’t have all the ingredients to make them so I had to settle for a pre-mixed packet.
- a pack of lardons
- two leeks, sliced into small rings
- an onion, roughly chopped
- 1/2 swede, peeled and roughly cubed
- a pack of about six good sized skinless, boneless chicken thighs, chopped into bite-sized pieces
- three cloves garlic, sliced
- handful of parsley, roughly chopped
- 1 tsp turmeric
- 1/2 tsp cayenne pepper
- 1 tsp ground ginger
- a bottle of white wine
- couple of handfuls of frozen peas
- couple of cups of chicken stock
- salt and pepper to taste
- 6-8 dumplings made from packet mix
Brown off the lardons in a hot stock pot, before adding the leeks, onion, garlic and swede. You don’t need extra oil, just let them cook in the tasty bacon fat until they’ve softened up a bit, for about 5 minutes or so. Add the chicken, cayenne pepper, ground ginger, and turmeric, and stir about in the mix before adding in the bottle of white wine and frozen peas. Top up with the chicken stock until it looks like there will be enough liquid for about half an hour’s cooking, and sit the doughy dumplings made from the mix on the top.
Cook for half an hour and when almost done, throw in the chopped parsley and season. This can be served on it’s own in a bowl, or with a generous serving of mashed potatos should make enough for four people.
Posted: February 7th, 2009 | Author: David | Filed under: Computer Science | Tags: analysis, last.fm, Music, Project, recommendations, subjective relationships, summary | No Comments »
This post is a continuation of Good Recommendations, Using Set Theory to analyse Recommendation relationships, Variation within Preferences and Predicting Preferences.
I’ve offered the idea that good recommendations lie on a scale between Obvious and Interesting. Taken to their extreme, the full line could actually run from Boring through to Random, with Obvious and Interesting somewhere in between. ‘Boring’ recommendations could be said to exist where the Advisor’s Preference Set is entirely made up of the Common Set (i.e. the Advisee knows at least as much as the Advisor). ‘Random’ recommendations could be said to exist where there is no Common Set at all (i.e. A disjoint B )
I’ve also attempted to explain my thoughts on the kinds of relationships that could exist between an Advisor and an Advisee, and ways in which they could be elaborated. I think I’ve done that, albeit in a not very scientific way. So there’s a lot of room for refinement, and there are some gaps to be filled (specifically around calculating variation within a set of preferences and analysing effects of different weightings of those preferences) and some of my assumptions are a little more tenuous than maybe they should be, but I think this could provide the basis for some interesting results.
I’m also keen to explore the possibility that subjective relationships (rather than behavioural relationships) between Things would produce better/more interesting recommendations and routes for discovery. For my MSc project, I’m intending to focus on the Music Domain, analysing music blogs to deduce relationships between artists to augment recommendations from existing services such as last.fm.
Posted: February 7th, 2009 | Author: David | Filed under: Computer Science | Tags: analysis, information retrieval, jaccard coeffient, predictions, preferences, Project, recommendations, set theory | No Comments »
This post is a continuation of Good Recommendations, Using Set Theory to analyse Recommendation relationships and Variation within Preferences.
Does all of this just mean that the underlying rule is to pair the Advisee to the Advisor with biggest Preference Set? And how does that relate to what was concluded earlier about the similarity of the two sets; the Jaccard co-effient. Taking an extreme scenario illustrated here:

Advisor (A) has a Preference Set of a large order of magnitude greater than the Advisee (B). Assuming that there’s a similar variance within the two sets, and that the previous assertions were correct, then this would clearly be approaching a Utopian case.
In reality we would find it difficult to assume so much about such a small sample relative to the larger one. It would be much better if we could transform the smaller set in to a larger sample on the basis of predicted future recommendations. Such as in the following diagram, where the dashed line shows the expansion of the Advisee’s original Preference Set to the Advisee’s Predicted Preference Set (B).

However, this makes the assumption that growth would be uniformly distributed out from the current Preference Set, and that the coupling of Advisor (A) with Advisee (B) was a good one to begin with and one that holds throughout the introduction of future recommendations.
My assumption would be that the variation within the Preference Sets holds the solution for this. Taking the difference in variation in the Common Set (A∩B) and the Recommendation Set (A—B) as ‘pull’ factors towards the Advisor and the difference in variation between the Common Set (A∩B) and B—A as ‘push’ factors away from the Advisor, we could infer growth of the Common Set with a the centre weighted towards or away from the Advisee. A greater pull could be shown as in the following diagram:

Whilst a greater push could be illustrated as:

The Jaccard co-effient could then be applied to work out the predicted similarity between the two sets. And from this, predict whether the original relationship is likely to provide more interesting, average, or more obvious recommendations.
Formally this can be represented as:
A∩PPS(B) / A∪PPS(B)
where: PPS(X) = weighted Predicted Preference Set of X
Summary: Between Obvious and Interesting