Displaying 9 results from an estimated 9 matches for "finalmodel".
2012 Jul 06
2
Graph showing fitted values obtained by binomial GLM
I have completed a binomial GLM in R (details attached (finalModel.docx)) and
I am trying to create a graph of observed and fitted values using the
following commands:
> MyData<-data.frame(time=seq(from=0,to=1323,by=1))
> Pred<-predict(M2,newdata=MyData,type="response")
> plot(x=turtle$time,y=turtle$success)
> lines(MyData$time,Pred)...
2009 May 04
1
Caret package: coeffcients for regression
Dear All,
I am using "Caret"package for SVM regression and elastic net
regression . I can get the final fiited vs observed values. How can I get
the coefficients? Any ideas?
Thanks
Alex
[[alternative HTML version deleted]]
2010 Mar 23
1
caret package, how can I deal with RFE+SVM wrong message?
...,sizes=subsets,rfeControl=rfectrl,method="rf",tuneGrid=rfGrid)
Loading required package: class
Attaching package: 'class'
The following object(s) are masked from package:reshape :
condense
Fitting: mtry=1
Fitting: mtry=2
Error in varImp.randomForest(object$finalModel, ...) :
subscript out of bounds
In addition: Warning message:
package 'e1071' was built under R version 2.10.1
At the same time, If I want to use RFE+SVM, RFE+nnet, and so on ,how can I
do? I have try RFE+SVM, also wrong message:> set.seed(1)
> svmProfile<-rfe(trx,try,sizes...
2009 Jun 08
3
caret package
Hi all
I am using the caret package and having difficulty in obtaining the results
using regression, I used the glmnet to model and trying to get the
coefficients and the model parameters I am trying to use the
extractPrediction to obtain a confusion matrix and it seems to be giving me
errors.
x<-read.csv("x.csv", header=TRUE);
y<-read.csv("y.csv", header=TRUE);
2010 Apr 06
1
Caret package and lasso
...response and design matrix
X<-matrix(rnorm(50*100),nrow=50)
y<-rnorm(50*1)
# Applying caret package
con<-trainControl(method="cv",number=10)
data<-NULL
data<- train(X,y, "lasso", metric="RMSE",tuneLength = 10, trControl = con)
coefs<-predict(data$finalModel,s=data$bestTune$.fraction, type
="coefficients", mode ="fraction")$coef
coefs
*This is the output which I got :*
you can see some of the predictors are missing like V4, V6, V7
V1 V2 V3 V5 V8
V9 V10 V11 V13...
2017 Oct 31
0
Final models from caret's train function
Using caret on the Titanic data from Kaggle, I tried various models,
including rfRules which produces a model, partly described as such:
> caret.rfRules.cv$finalModel
$model
len freq err
[1,] "2" "0.0368" "0"
[2,] "2" "0.032" "0.05"
[3,] "2" "0.1824" "0.0526315789473685"
[4,] "4" "0.0656" &qu...
2007 Oct 30
1
NAIVE BAYES with 10-fold cross validation
hi there!!
i am trying to implement the code of the e1071 package for naive bayes, but it doens't really work, any ideas??
i am very glad about any help!!
i need a naive bayes with 10-fold cross validation:
code:
library(e1071)
model <- naiveBayes(code ~ ., mydata)
tune.control <- tune.control(random = FALSE, nrepeat = 1, repeat.aggregate = min,
sampling = c("cross"),
2009 May 05
1
self organizing map advice for categorical data
...regression . I can get the final fiited vs observed values. How can I get
> the coefficients? Any ideas?
You didn't say what version of caret and R you are using, what kernel
or what type of coefficients.
If you tune a model using train:
fit <- train(x, y, "enet")
then fit$finalModel contains an enet object with the final parameters.
You can use coef() or any other appropriate function on this object.
In the case of the elastic net, see ?predict.enet, specifically the
type argument to get the regression coefficients.
If you need to get to the final tuning parameters for the m...
2010 Mar 24
0
R-help ordinal regression
...rfGrid)
> Loading required package: class
>
> Attaching package: 'class'
>
>
> ? ? ? ? The following object(s) are
> masked from package:reshape :
>
> ? ? ? ???condense
>
> Fitting: mtry=1
> Fitting: mtry=2
> Error in varImp.randomForest(object$finalModel, ...) :
> ? subscript out of bounds
> In addition: Warning message:
> package 'e1071' was built under R version 2.10.1
>
>
> At the same time, If I want to? use RFE+SVM,?
> RFE+nnet, and so on ,how can I
> do? I have try RFE+SVM, also wrong message:>
> set....