[R] selection of hinge function with restrictions, machine learning, earth package,

2011-01-27 Thread Rasti Matus
Hi,

I have a few questions regarding machine learning packages in R, e.g.
earth package
and its forward pass and prunning pass, and hinge functions selection in the
example below.

1) How could I force the algorithm to generate knots in hinge function only
with values  90 for e.g. variable doy?
2) Is it possible to restrict the algorithm to generate maximum number of
terms per a selected variable e.g. humidity? e.g. 1 term instead of 2?

Thanks a lot.
rasti

library(faraway)
data(ozone)
a=earth(O3~.,data=ozone)
summary(a)

Call: earth(formula=O3~., data=ozone)

   coefficients
(Intercept)   8.6910756
h(vh-5740)0.0152607
h(5740-vh)   -0.0130076
h(9-wind) 0.3044601
h(humidity-41)0.2753048
h(humidity-54)   -0.2615068
h(temp-58)0.3801961
h(ibh-1069)  -0.0006189
h(1069-ibh)  -0.0029057
h(dpg-11)-0.1060948
h(80-vis) 0.0459011
h(doy-89) 0.0471836
h(89-doy)-0.1264530
h(doy-159)   -0.0915781

Selected 14 of 19 terms, and 8 of 9 predictors
Importance: temp, ibh, doy, dpg, humidity, vh, vis, wind, ibt-unused
Number of terms at each degree of interaction: 1 13 (additive model)
GCV 14.85938RSS 4134.014GRSq 0.769177RSq 0.8042181

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Copula package: How to calculate correlation matrix using 144 variables to denote parameters for normal copula?

2008-11-10 Thread rasti matus
Dears,

I calculated correlation matrix using 144 variables with a given function:
cor_flows_vec=cor()

Then I  defined a normal copula with the above correlation matrix
myCop=normalCopula(param=cor_flows_vec, dim = 144, dispstr = un)

Then I created a multivariate distribution with our defined copula while the
univariete functions were fitted by GEV distribution using fExtremes package
library(fExtremes)

paramMargin=function(d){

n=length(d[1,])
param=c(1:n)

for (i in seq(1:n)){
param[i]= list(list(xi=d[1,i], mu=d[2,i], beta=d[3,i]))
}
return(param)
}

paramMargins=paramMargin(d)

myMvd - mvdc(copula=myCop,
margins=c(rep(gev,144)),paramMargins=paramMargins)

The problem occures when I am trying to sample from the mvdc regarding
correlation matrix.
rmvdc(myMvd, 3)

Cam anyone help? Thanks

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.