Skip navigation.


Bayesian vs. Frequentist

This article provides good arguments from perspective of both sides:

[2008] Objections to Bayesian statistics (with discussion). {\em Bayesian Analysis}, to appear. (Andrew Gelman)
Rejoinder to discussion. (Andrew Gelman)

It is very nice to see a balanced view on the issue.

Bayesian vs. Frequentist

Visualizing MovieLens Rating Matrix

It is interesting to look at the visualization of the MovieLens Rating Matrix

Here is a random sub sample



Here is the Matlab's code:

% load data
% Multi-character delimiters are not supported;
% so we get columns with delimeters too
D = importdata('ratings.dat',':');

% load data into sparse matrix
X = sparse(D(:,3),D(:,1),D(:,5));

% plot the whole matrix
imagesc(X'); figure(gcf)

% plot random sampling of matrix
r1_idx = randint(1,100,[1,6040]);
r2_idx = randint(1,100,[1,3592]);
R = X(r2_idx,r1_idx);
imagesc(R'); figure(gcf)


MovieLens movie's popularity plot/graph (Matlab)

This is the code to load the MovieLens dataset into Matlab and to do some plotting:

The simpleset way of loading the dataset is via ImportWizard

All I want to do is to plot a graph where x-axis is movie id and y-axis is popularity (number of ratings).


% column of movie_ids
m = ratings(:,3);

% 1:3592 = movie_ids
[freq,xout] = hist(m,(1:3592));

% plotting sorted by popularity
plot( sort(freq));


The result is a nice power law (long tailed) distribution.

AdWords API: java.lang.NullPointerException

I had a rather strange error:



Examples provided in the API documentation are incorect:

  • using the wrong package names
  • not working even after fixing some minor errors

As the above blog suggests it is much better just to use library from and the corresponding examples



Location of jdesktop.jar

NetBeans uses jdesktop but does not deploy it properly so you have to add it the library by yourself.

Keywords: org-jdesktop-layout.jar download location path NetBeans org.jdesktop.application import cannot be resolved class not found

It is located in your NetBeans projet folder:




neil@DS:~$ find  -name '*jdesktop*.jar'



package org.jdesktop.layout does not exist
        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);

UML for NetBeans 6.1

UML for NetBeans 6.1 EE

In my opinion UML should have been included in the default install (to promote good engineering/coding practices).  It is not, so here what you need to do to install it:

1) click on the menu: Tools/Plugins
2) select "Available Plugins" tab
3) select UML plugin
4) install


Ubuntu / Java lost focus issues

Problem: suddenly java applications such as Eclipse, NetBeans lost the text cursor focus (e.g. when performing auto complete, search, etc).  A temporary fix was to switch alt-tab between the windows and then the focus would be regained.

Solution: In my case it seem to have been caused by SCIM.  To fix it System/Administration/Language Support then uncheck the "Enable support to enter complex characters".

Keywords: ubuntu hardy heron java lost focus netbeans eclipse switch problem compiz SCIM

Work Log

Implementing VOI Analyzer


Reduce itteration for influenceAL from 7min -> 1 sec


Estimate preferences in a batch manner:
Estimating the ratings:
    for each user
        newRatings (items rated by the user) = scaled by the user's correlation


Influence AL takes a very long time

It takes 7 min to estimate all the preferences

Apr 27, 2008 11:13:15 AM com.planetj.taste.impl.recommender.VOIUserBasedRecommender estimatePreferences
INFO: Start.
Apr 27, 2008 11:20:20 AM com.planetj.taste.impl.recommender.VOIUserBasedRecommender estimatePreferences


Optimizing Influence-based AL

Right now selecting an AL item, takes 2 hours - thats a little bit too long :)

Trying to optimize it


Syndicate content