[R] MARS response weights

2011-03-27 Thread Vijayakumar Ramachandran
I am trying to use the "mars" function from "mda" package and cannot figure out how to specify the response weights "wp" parameter. I have tried a vector of size = num_observations as well as num_levels of my response, but in both cases, the function fails with some error about invalid array l

[R] natural cubic spline and multiple variables

2011-02-12 Thread Vijayakumar Ramachandran
I want to create natural cubic spline on my predictors and fit them to a linear model. The DF and Degree of all the splines are the same. I noticed that I can setup the lm() formula as y~ns(x1, df=5) + ns(x2, df=5). My problem is that I have a huge number of predictors (hundreds). ns however

[R] SVM Posterior Probabilities

2010-12-16 Thread Vijayakumar Ramachandran
I am using SVM in R via package e1071 package. Is it possible to obtain probabilities of the classification for the test set based on distances from the classification planes? This seems possible in Linear Discriminant Analysis (via lda function in MASS package) through the posterior probabil