Ching-Chuan Chen's Blogger

Statistics, Machine Learning and Programming

0%

Here is a demonstration to grab lottery number by using RSelenium. Since RCurl cannot parse the table produced by javascript, we need to construct a server to interpret javascript and grab the information we need. The tool of building server is RSelenium. It is simple to generate the html page by javascript, then we can access the table we want.

Read more »

R的BLAS庫效率不彰,在linux上可以透過更換成openBLAS來加速,或是compiled with intel MKL,在windows上compile R是一個痛苦的過程。

因此,有人提供這方面的資源,最有名的就是Revolution,Revolution是compiled with intel MKL,但是要錢。但是天無絕人之路,總是有其他辦法的。

Read more »

This code is to find the unique rows of a matrix. It is based on the quick sort algorithm. Thanks to this, I can use MatLab to implement faster sorting of rows.

I compiled this code with Microsoft Visual Studio 2015 and Intel Parallel Studio XE 2017 and linking to armadillo library.

Read more »

There is a data give the Time and ID to find the Session. The value of variable session is given by the Time variable. The session of first time in ID is 1, session is 2 if the different time between its time and the first time of session time is longer than 1 hour, and otherwise session is 1 until next time is out of range of 1 hour.

Read more »