All posts by Min

About Min

The only poster of this site :)

Making Recommandation on MovieLens Data with Collaborative Filtering

I am doing some research on building recommendation engine.

Among resources I collected, the book Building Recommendation Engine from Packt Pub is a good one with overview on how to engineering recommendation engine and with working samples.

One problem I found in Chapter 5 BUILDING COLLABORATIVE FILTERING RECOMMENDATION ENGINES is the sample code in python doing recommendation on Movie Lens 100k data is that the RMSE values are as high as 11.

A quick google can find some tutorials on the web, doing the same thing on ml-100k data set, using SVD or ALS algorithm have a RMSE lower than 1.0, commonly 0.9x.

In the Chapter 7 of the book, BUILDING REAL-TIME RECOMMENDATION ENGINES WITH SPARK, author using Spark ALS reached 0.9x RMSE on same data set.

It looks the author did not put too much effort polishing Chapter 5’s code sample.

I would recommend following articles and samples over Chapter 5 of this book:

Issue of Windows 7 SP1 Slow Windows Update Checking

For some reason, I installed a virtual machine with Windows 7 Pro SP1.

The initial windows update checking was quite slow, with no progress for a couple of minutes and the cpu was keeping high as 100% by a service host process. Definitely something wrong here.

So I googled and found the solution from here. The key point is install a patch from a  MS KB article:

After that I received 200+ patches from Windows Update and installed them.


Resize HortonWorks Sandbox Disk Size


I’ve created a HortonWorks HDP Sandbox on Azure for testing.

The initial OS disk size is about 48GB, which is too small to hold my files in HDFS for testing.

I find out a way to extend the OS disk to simply increase the HDFS capacity.





Basically it’s create a new LVM partition then add this partition to existing LVM  OS logic volume group.

  1. Attache a disk in Azure portal to the HDP virtual machine.
  2. Create new partition (/dev/sdc1) on that disk (/dev/sdc) and assign partition id ‘8e’, which is LVM partition.
  3. Use ‘vgdisplay’ to find volume group name, it’s ;vg_sandbox’ on HortonWorks sandbox.
  4. Use ‘vgextend’ to extend ‘vg_sandbox’ with the newly created ‘/dev/sda3’.
  5. Use ‘lvdisplay’ to find logical volume name, it’s “lv_root”, path is ‘/dev/vg_sandbox/lv_root’.
  6. Use ‘lvextend –L +xxxG /dev/vg_sandbox/lv_root’ to extend size of the logical volume. xxxG is the free space in volumn group ‘vg_sandbox’, which can be find using vgdisplay.
  7. Use ‘resize2fs /dev/vg_sandbox/lv_root’ to resize the partition online, this step takes some time.


Syncing Calendar from Corporate Exchange to Account on Windows Phone

The requirement is simple, to sync my calendar from my company email account, which runs on Exchange Server and client is Outlook, to the Microsoft account on my Windows Phone.

This KB article stated that on Outlook 2010 or 2007, one can use the Outlook Connector software to do this, which is not my case as I am using Outlook 2013. The article also gives a silly solution for Outlook 2013, which simply need I copy meetings manually from the two calendar.

May I  create a little application to do this automatically?

Change Google Font CDN URL to Speed Up Semantic UI Page Loading

Semantic UI is a great web UI framework that ease UI related works.

The default font used in Semantic UI is google font and it is loaded from Google’s CDN, which had been blocked in China for a long time. This can cause a very long-time of first page loading.

To fix this, one can follow Semantic UI customization guide and make change there. An know issue has been submitted on Github site of Semantic UI.

For those who don’t want to customize it, there is a simple solution: change the semantic.sss in dist folder, change the first line from

@import ‘,700,400italic,700italic&subset=latin’;


@import ‘,700,400italic,700italic&subset=latin’;


The is a China local CDN which replicated from the Google one, makes access from China faster.

Ionic Framework with Visual Studio Cordova Tools

Playing IonicFramework with Microsoft Visual Studio Cordova Tools CTP3, I found a series of articles on setup demo IonicFramework app with MS Cordova Tools.

Here is the links:


And this is a brief:

  1. Create a TypeScript Blank Cordova App in VS 2013
  2. Get the Ionic package from NuGet, drag ‘script/ionic-bundles.js’ and ‘content/ionic.css’ to index.html to create script references
  3. Use command ‘ionic start myApp sidemenu’ to create a project scaffold
  4. Copy ‘www/templates’ folder from scaffold project to VS project, let it be the same level of existing ‘scripts’ folder
  5. Create a ‘app’ folder inside ‘scripts’ folder, move index.ts from /scripts into /scripts/app, update reference of index.js in index.html. Copy app.js and controller.js from www/js of that scaffold project to /scripts/app folder.
  6. Add or adjust references of js/ts files to index.html, create a ng-app directive.
  7. Install angularjs.TypeScript.DefinitelyTyped by right click on angular.js in scripts folder and select “Search for Typescript Typings”.
  8. Create a services.ts file in scripts/app folder, create service and inject to Angular
  9. Create a controller.ts file, register service to controller.
  10. Modify template data binding to fetch data from the service


For building failure of “The certificate specified has expired” on Windows platform, it’s a bug of Cordova tools. See: