similar to: modifying predict.nnet() to function with errorest()

Displaying 20 results from an estimated 1000 matches similar to: "modifying predict.nnet() to function with errorest()"

2005 Jul 27
1
how to get actual value from predict in nnet?
Dear All, After followed the help of nnet, I could get the networks trained and, excitedly, get the prediction for other samples. It is a two classes data set, I used "N" and "P" to label the two. My question is, how do I get the predicted numerical value for each sample? Not just give me the label(either "N" or "P")? Thanks! FYI: The nnet example I
2004 Jan 09
3
ipred and lda
Dear all, can anybody help me with the program below? The function predict.lda seems to be defined but cannot be used by errortest. The R version is 1.7.1 Thanks in advance, Stefan ---------------- library("MASS"); library("ipred"); data(iris3); tr <- sample(1:50, 25); train <- rbind(iris3[tr,,1], iris3[tr,,2], iris3[tr,,3]); test <- rbind(iris3[-tr,,1],
2005 Jan 06
1
different result from the same errorest() in library( ipred)
Dear all, Does anybody can explain this: different results got when all the same parameters are used in the errorest() in library ipred, as the following? errorest(Species ~ ., data=iris, model=randomForest, estimator = "cv", est.para=control.errorest(k=3), mtry=2)$err [1] 0.03333333 > errorest(Species ~ ., data=iris, model=randomForest, estimator = "cv",
2005 Jun 23
1
errorest
Hi, I am using errorest function from ipred package. I am hoping to perform "bootstrap 0.632+" and "bootstrap leave one out". According to the manual page for errorest, i use the following command: ce632[i]<-errorest(ytrain ~., data=mydata, model=lda, estimator=c("boot","632plus"), predict=mypredict.lda)$error It didn't work. I then tried the
2003 Jun 24
1
errorest: Error in cv.numeric()
Hi, I am trying to get an error estimation for a classification done using lda. The examples work fine, however I don't get my own code to work. The data is in object d > d class hydrophobicity charge geometry 1 2 6490.0400 1434.9700 610.99902 2 2 1602.0601 400.6030 -5824.00000 3 2 969.0060 260.1360 -415.00000 4 1
2009 Apr 25
1
Overlapping parameters "k" in different functions in "ipred"
Dear List, I have a question regarding "ipred" package. Under 10-fold cv, for different knn ( = 1,3,...25), I am getting same misclassification errors: ############################################# library(ipred) data(iris) cv.k = 10 ## 10-fold cross-validation bwpredict.knn <- function(object, newdata) predict.ipredknn(object, newdata, type="class") for (i in
2002 Mar 17
3
apply problem
> data(iris) # iris3 is first 3 rows of iris > iris3 <- iris[1:3,] # z compares row 1 to each row of iris3 and is correctly computed > z <- c(F,F,F) > for(i in seq(z)) z[i] <- identical(iris3[1,],iris3[i,]) > z [1] TRUE FALSE FALSE # this should do the same but is incorrect > apply(iris3,1,function(x)identical(x,iris3[1,])) 1 2 3 FALSE FALSE FALSE
2000 Mar 08
3
Reading data for discriminant analysis
Dear R users, I want to do discriminant analysis on my data. I have successfully followed the discriminant analysis in V & R on the iris data: > ir <- rbind (iris3[,,1],iris3[,,2],iris3[,,3]) > ir.species <- c(rep("s",50),rep("c",50),rep("v",50)) > a <- lda(log(ir),ir.species) > a$svd^2/sum(a$svd^2) [1] 0.996498601 0.003501399 > a.x <-
2005 Jan 10
0
Stadard errors and boxplots with 632plus error estimator, "errorest"
Dear R-users, I'd like to estimate standard errors (for lda) and make a boxplot with the "632plus" and "boot" error estimators included in package ipred (method: errorest). The "boot" estimator returns only a standard deviation but not the whole error data. Thank you in advance, regards, Antoine
2004 Nov 02
2
lda
Hi !! I am trying to analyze some of my data using linear discriminant analysis. I worked out the following example code in Venables and Ripley It does not seem to be happy with it. ============================ library(MASS) library(stats) data(iris3) ir<-rbind(iris3[,,1],iris3[,,2],iris3[,,3]) ir.species<-factor(c(rep("s",50),rep("c",50),rep("v",50)))
2009 May 30
0
what is 'class.ind' here?
Hi. The there is an example in nnet help which is pasted in below. I am not sure how they are generating 'targets'. What is the 'class.ind() function doing? In the help docs for it they say "Generates a class indicator function from a given factor." I tried putting a simple vector of the "classes" into test.cl (below) but I get an error of "(list) object
2013 May 20
0
Neural network: Amore adaptative vs batch why the results are so different?
I am using the iris example came with nnet package to test AMORE. I can see the outcomes are similar to nnet with adaptative gradient descent. However, when I changed the method in the newff to the batch gradient descent, even by setting the epoch numbers very large, I still found all the iris expected class=2 being classified as class=3. In addition, all those records in the outcomes (y) are the
2009 Nov 17
1
Error running lda example: Session Info
> > library(MASS) > Iris <- data.frame(rbind(iris3[,,1], iris3[,,2], iris3[,,3]), + Sp = rep(c("s","c","v"), rep(50,3))) > train <- sample(1:150, 75) > table(Iris$Sp[train]) c s v 22 23 30 > z <- lda(Sp ~ ., Iris, prior = c(1,1,1)/3, subset = train) Error in if (targetlist[i] == stringname) { : argument is of length
2013 Jan 26
2
different legends in lattice panels
Hi listers, I want to make lattice plots xyplots with the indication of legends inside each panel with only the points and the lines actually ploted inside each given panel according to the group(ing) factor. The code below shows what I have achieved so far and I hope will make clear what I want to have. It seems to me that my solution is a very "dirty hack" and there certainly is
2010 Mar 10
1
Extract values of a two-factor table and duplicate them into a three-factor table
Dear all, I would like to solve a trivial problem (I guess it is) but can't find the right way. Maybe someone can help me ? I've got a table with two factors (station = station ID, buffer = buffer size in meters) and a value for each unique combination of those two factors (S = number of habitats within each buffer around each station) like this: TABLE 1 station buffer S Abaia01 200 2
2016 Dec 02
1
pdftools on Ubuntu
Hi Francois, Thanks for your quick response. Actually, I had already done that... sudo apt-get install libpoppler-cpp-dev Reading package lists... Done Building dependency tree Reading state information... Done libpoppler-cpp-dev is already the newest version (0.41.0-0ubuntu1.1). 0 upgraded, 0 newly installed, 0 to remove and 107 not upgraded. Therefore, I assume I have this installed. Best
2013 Dec 12
1
censored counts and glmer/glmmADMB
dear R-users, I have to model counts where all counts above some threshold have been censored. In the same dataset I have too many zeroes for a Poisson or even a negative binomial distribution to make sense, so I would need a zero-inflated-censored negative binomial family for use in glmer (or glmmADMB?). That seems not to exist. my question is : how could I add a custom-built family of
2006 Oct 23
2
character manipulation
Dear R'helpers, I am reading lines in a .txt file Each line is stocked into a n elements object, as this: [958] " 422 287 339 31 203 602 547 1026 500 366 346 227" [959] " 410 67 11 220 110 451 562 598 732 163 163 220" [960] " 179 513 95 186 102 595 333 1289 804 210 294 459" [961] " 276 153 307 138 126 233 623 739 521 421 209 75" [962] " 64
2005 Jun 24
1
mypredict.
Hi, I am wondering what does "mypredict.lda<-function(object, newdata)predict(object, newdata=newdata)$class" actually do? I run a few errorest commands in the same function on the same dataset using the same classifier lda. The only difference is some use "cv", other use "boot" and "632plus". They all share one mypredict.lda. Will it cause any
2005 Mar 18
2
logistic model cross validation resolved
This post is NOT a question, but an answer. For readers please disregard all earlier posts by myself about this question. I'm posting for two reasons. First to say thanks, especially to Dimitris, for suggesting the use of errorest in the ipred library. Second, so that the solution to this problem is in the archives in case it gets asked again. If one wants to run a k-fold cross-validation