Saturday, November 24, 2012

R normalize data into 0-1 Interval


function normalize(data)
{
  maxvalues = apply(data,2,max)
  minvalues = apply(data,2,min)
  sweep(data,2,minvalues,"-")
  sweep(data,2,maxvalues-minvalues,"/")
}

Monday, November 05, 2012

R hold plot

There is no hold function R instead lines or points are used for that purpose :


plot(method1,type="l", main="Accuracy vs Number of Training samples",
      xlab="Number of samples", ylab="Accuracy",
      xlim=c(0, 30), ylim=c(0, 1))
lines(method2,col="blue")

Friday, November 02, 2012

Tanenbaum's Phrase

I liked the phrase "Researcher-push than demand-pull" in Tanenbaum's OS book.

Thursday, November 01, 2012

AI

Despite the benefits of AI we are starving for humanity.