In a previous post I discussed the concept of gradient descent. Given some recent work in the online machine learning course offered at Stanford, I'm going to extend that discussion with an actual example using R-code (the actual code...

Last time we looked at the Matrix package and dug a little into the chol(), Cholesky Decomposition, function. I noted that often in finance we do not have a positive definite (PD) matrix. The chol() function in both the Base and Matrix...

The need to analyze time-series or other forms of streaming data arises frequently in many different application areas. Examples include economic time-series like stock prices, exchange rates, or unemployment figures, biomedical data sequences like electrocardiograms or electroencephalograms, or industrial process operating data sequences like temperatures, pressures or concentrations. As a specific example, the figure below shows four data sequences:...

Here are the presentation slides I used for my talk on “Using R for Data Mining Competitions” at Ryerson University as part of the Greater Toronto Area (GTA) R User’s Meetup Group. Presentation (Prezi) Presentation (PDF) Meetup Event page Special thanks to Anthony Goldbloom from Kaggle and various competition winners for sharing their code and

I follow some 80 odd people/ news sources on my twitter account. For a while I wondered which of these sources are most active on twitter. I picked a simple metric '# of status messages posted to twitter' as the measure of activity. Using R I quickly wrote a program to generate my top 10 most active...

This is another pretty simple function, written to help me solve the simplest representation of a trivial but tedious task. Most biologist are probably familiar with this task. How many nucleotide differences exist between two given sequences? I only faced the easiest part of the problem, i.e. I do not perform alignment, I just assume that

ConPA is an asset allocation application using the classic Markowitz approach. For the calculations the open-source statistical programming language R is used. R scripts are executed on cloudnumbers.com’s computer clusters in the Cloud and the results are displayed by ConPA frontend. ConPA allows to set the investment date of the portfolio, the target return and

Earlier, I found an interesting post from Bo Allen on pseudo-random vs random numbers, where the author uses a simple bitmap (heat map) to show that the rand function in PHP has a systematic pattern and compares these to truly random numbers obtained from random.org. The post’s results suggest that pseudo-randomness in

Happy Thanksgiving, everyone. Earlier today, I found an interesting post from Bo Allen on pseudo-random vs random numbers, where the author uses a simple bitmap (heat map) to show that the rand function in PHP has a systematic pattern and compares these to truly random numbers obtained from random.org. The post’s results suggest that pseudo-randomness in PHP is

I wrote a simple Backtesting library to evaluate and analyze Trading Strategies. I will use this library to present the performance of trading strategies that I will study in the next series of posts. It is very easy to write a simple Backtesting routine in R, for example: The code I implemented in the Systematic

Trying not to fall into Thanksgiving Day, football, coma. So I started looking at the Matrix package.Started out by changing my code from before to create a matrix using the Matrix() function from the Matrix package.n = 4000c = Matrix(.9,n,n)for(...

A few days ago, one of my students, Jacopo Primavera (from La Sapienza, Roma) presented his “reading the classic” paper, namely the terrific bounded normal mean paper by my friends George Casella and Bill Strawderman (1981, Annals of Statistics). Even though I knew this paper quite well, having read (and studied) it myself many times,

The R programming language has become one of the standard tools for statistical data analysis and visualization, and is widely used by Google and many others. The language includes extensive support for working with vectors of integers, numerics (doubles), and many other types, but has lacked support for 64-bit integers. ...

It's Thanksgiving day here in the US: > library(timeDate) > holiday(2011,"USThanksgivingDay") GMT So we're taking a little break today here at Revolutions. We have a special "Because it's Friday" post queued up for tomorrow, and then we'll be back to the usual schedule on Monday. For readers in the US, enjoy the Thanksgiving holiday!

The following function, color.palette(), is a wrapper for colorRampPalette() and allows some increased flexibility in defining the spacing between main color levels. One defines both the main color levels (as with colorRampPalette) and an optional vector containing the number of color levels that should be put in between at equal distances. The above...