similar to: paste dependent variable in formula (rpart)?

Displaying 20 results from an estimated 10000 matches similar to: "paste dependent variable in formula (rpart)?"

2001 Aug 12
2
rpart 3.1.0 bug?
I just updated rpart to the latest version (3.1.0). There are a number of changes between this and previous versions, and some of the code I've been using with earlier versions (e.g. 3.0.2) no longer work. Here is a simple illustration of a problem I'm having with xpred.rpart. iris.test.rpart<-rpart(iris$Species~., data=iris[,1:4], parms=list(prior=c(0.5,0.25, 0.25))) + ) >
2003 May 25
1
Example Data Set(s) for nnet, rpart
Hi, I'm doing a presentation on Neural Networks and Tree-Based Models in two weeks, at the moment I'm looking for a data set to use in the presentation. What I would like to use is a good old data, like the Iris data, that is already known by every statisticians. MASS4 uses the cpus data in Chapter 8.10 and the Cushing's syndrome in Chapter 12.4. These two data sets plus the
2005 Oct 14
1
Predicting classification error from rpart
Hi, I think I'm missing something very obvious, but I am missing it, so I would be very grateful for help. I'm using rpart to analyse data on skull base morphology, essentially predicting sex from one or several skull base measurements. The sex of the people whose skulls are being studied is known, and lives as a factor (M,F) in the data. I want to get back predictions of gender, and
2012 Oct 16
1
matriz de confusión de un arbol de clasificacion rpart
Hola a todos, Me gustaría obtener la matriz de confusión generada a partir de la validación k-fold que aplica rpart por defecto. Alquien podría decirme como poder recuperar esa matriz. He echado un vistazo a la documentación de rpart, pero no consigo averiguarlo. Gracias de antemano Saludos Víctor [[alternative HTML version deleted]]
2005 Aug 14
1
How to add decision trees into a list?
Hi, I am somewhat new to R so this question may be foolish, but is it possible to add decision trees into a list, array or vector in R? I am trying to build a collection (ensemble) of decision trees. Every time a new instance arrive I need to get the prediction of each decision tree. I have tried to add a decision tree into a variable but without luck. Is a special package needed perhaps? This
2003 Jul 17
1
Rpart question - labeling nodes with something not in x$frame
I have a tree created with tr.hh.logcas <- rpart(log(YCASSX + 1)~AGE+DRUGUSEY+SEX+OBSXNUM +WINDLE, xval = 10) I would like to label the nodes with YCASSX rather than log(YCASSX + 1). But the help file for text in library rpart says that you can only use labels that are part of x$frame, which YCASSX is not. Is there a way to do what I want? Thanks in advance Peter Peter L. Flom, PhD
2010 Apr 21
1
question on rpart
Hello, I have attempted to email the author of this package without success, just wondering if anybody else has experienced this. I am having an using rpart on 4000 rows of data with 13 attributes. I can run the same test on 300 rows of the same data with no issue. When I run on 4000 rows, Rgui.exe runs consistently at 50% cpu and the UI hangs.... it will stay like this for at least 4-5hours if
2007 Feb 15
2
Does rpart package have some requirements on the original data set?
Hi, I am currently studying Decision Trees by using rpart package in R. I artificially created a data set which includes the dependant variable (y) and a few independent variables (x1, x2...). The dependant variable y only comprises 0 and 1. 90% of y are 1 and 10% of y are 0. When I apply rpart to it, there is no splitting at all. I am wondering whether this is because of the
2012 May 15
1
caret: Error when using rpart and CV != LOOCV
Hy, I got the following problem when trying to build a rpart model and using everything but LOOCV. Originally, I wanted to used k-fold partitioning, but every partitioning except LOOCV throws the following warning: ---- Warning message: In nominalTrainWorkflow(dat = trainData, info = trainInfo, method = method, : There were missing values in resampled performance measures. ----- Below are some
2010 May 03
1
rpart, cross-validation errors question
I ran this code (several times) from the Quick-R web page ( http://www.statmethods.net/advstats/cart.html) but my cross-validation errors increase instead of decrease (same thing happens with an unrelated data set). Why does this happen? Am I doing something wrong? # Classification Tree with rpart library(rpart) # grow tree fit <- rpart(Kyphosis ~ Age + Number + Start,
2007 Jan 25
1
rpart question
I make classification tree like this code p.t2.90 <- rpart(y~aa_three+bas+bcu+aa_ss, data=training,method="class",control=rpart.control(cp=0.0001)) Here I want to set weight for 4 predictors(aa_three,bas,bcu,aa_ss). I know that there is a weight set-up in rpart. Can this set-up satisfy my need? If so, could someone give me an example? Thanks, Aimin Yan
2009 Jul 26
3
Question about rpart decision trees (being used to predict customer churn)
Hi, I am using rpart decision trees to analyze customer churn. I am finding that the decision trees created are not effective because they are not able to recognize factors that influence churn. I have created an example situation below. What do I need to do to for rpart to build a tree with the variable experience? My guess is that this would happen if rpart used the loss matrix while creating
2020 Jan 04
2
A modern object-oriented machine learning framework in R
Estimadísimo Carlos: Muchísimas gracias por responderme y hacerlo tan rápido. Contemplé esa posibilidad, es decir, que el hiperparámetro estuviera suponiendo un problema, y probé de esta forma: > learner <- lrn("classif.ranger", num.trees = 5, mtry = NULL) Error: Element with key 'classif.ranger' not found in DictionaryLearner!
2003 Apr 16
2
Jackknife and rpart
Hi, First, thanks to those who helped me see my gross misunderstanding of randomForest. I worked through a baging tutorial and now understand the "many tree" approach. However, it is not what I want to do! My bagged errors are accpetable but I need to use the actual tree and need a single tree application. I am using rpart for a classification tree but am interested in a more unbaised
2004 Mar 19
2
How to collect trees grown by rpart
Jonathan, Try making a list instead of an array. See ?list. Also, did you look into random forests? I'm not sure what you want to do, but there might be methods there to do some of the work for you. Sean On 3/19/04 1:12 PM, "Jonathan Williams" <jonathan.williams at pharmacology.oxford.ac.uk> wrote: > I would like to collect the trees grown by rpart fits in an array,
2008 Feb 14
3
contingency table
Hello! May you help me? I'm trying to do a contingency table using this > data(iris) > library(rpart) > modelo <- rpart(Species ~., iris) > prev <- predict(modelo, iris) Finally the contingency table > table(iris$Species, prev) But an error occurs: Error in table(iris$Species, prev) : all arguments must have the same length And I do not understand why, may you
2004 Aug 21
3
sweave and post "rpart"
Hi, have anybody positive experience how it is possible get the post output from a rpart-object in a large sweave file or is only the less nicely plot function instead of post possible??? \begin{figure}[htbp] \begin{center} <<fig=true,eps=T>>= post(dtreeEB, title="Tree",digits=getOption("digits") - 0,use.n=TRUE) @ \caption{Tree1} \end{center}
2003 Feb 12
1
rpart v. lda classification.
I've been groping my way through a classification/discrimination problem, from a consulting client. There are 26 observations, with 4 possible categories and 24 (!!!) potential predictor variables. I tried using lda() on the first 7 predictor variables and got 24 of the 26 observations correctly classified. (Training and testing both on the complete data set --- just to get started.) I
2002 Aug 27
1
unlist (rpart.object.list)
Hello, can me please help anbody how it is possible unlist a "rpart.object.list" i.e. from bagging(ipred) to plot this "unique" several rpart.objects . ..i make attempts with unlist, get really atomic elements, but need only the different tree's ! Thanks for advance & regards,Christian -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
2013 Feb 12
1
caret: Errors with createGrid for rf (randomForest)
When I try to crate a grid of parameters for training with caret I get various errors: ------------------------------------------------------------ > my_grid <- createGrid("rf") Error in if (p <= len) { : argument is of length zero > my_grid <- createGrid("rf", 4) Error in if (p <= len) { : argument is of length zero > my_grid <-