similar to: Classification trees problem.

Displaying 20 results from an estimated 4000 matches similar to: "Classification trees problem."

2011 Dec 12
3
Variables from a Dataframe
Hello everyone, I want make a variable selection  from a dataframe, but when I build this new object (using cbind) the new table (which is a matrix) I lost all the original factor names in the variables. I get 1,2,3.... Someone would be so kind and tell me if there's is a ny way to get variables in a dataframe, but not changing these factor to numbers? Thank you all. José [[alternative
2011 Oct 14
3
change uppercase variables
 Hello everyone, I'm trying to change the name variables of a big dataset. Here's more than 300 variables. The point is that I have to match it with another dataset that have same variables, but in lowercase, the I can use rbind and do my work. Is there any function for changing uppercase or lowercase variables? Thank you in advance! José [[alternative HTML version deleted]]
2011 Apr 21
1
numbers and superscripts in the same unit of measurement.
Hola everyone, I'm doing an analisys about abundance of a planctonic specie in Robinson Crusoe Islan and I am having a hard time just adding the superscripts and the 100 (one hundred) in the measure of abundance. Perhaps this is so basic to you, but I need to put the real unit of measure. Individuals / 100 cubic meters. I have been looking in websites and R-list and there is not any
2012 Apr 26
1
creating a package?
Dear R users.   I'm trying to know how to create a function. I have developed a big code that use a file and makes many process and then creates a table that is exported as txt. The point is to make something like a function.  I need to make it easy for others, so they can run it. This has a particular name? I will be very gratefull and placed if any of you can provide some lights.
2011 Jan 26
2
Extracting the terms from an rpart object
Hello all, I wish to extract the terms from an rpart object. Specifically, I would like to be able to know what is the response variable (so I could do some manipulation on it). But in general, such a method for rpart will also need to handle a "." case (see fit2) Here are two simple examples: fit1 <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis) fit1$call fit2 <-
2011 Apr 22
3
Parametrized object name in Save statement
Greetings All, I am looking to write a parametrized Rscript that will accept a variable name(that also is the name of the flat file), transform the data into a data frame and preform various modeling on the structure and save the output and plot of the model. In this example i am using a rpart decision tree. The only problem i am having is integrating the parameter into the internal object name
2010 Dec 30
2
Curso de R en Santiago, Chile. Gratis!
Estimados, A todos quienes estan insterados y estan en Stgo de Chile les tengo una muy buena noticia. Desde hace ya algunas semanas, nos hemos sentado a la mesa con Alex (Epidemiologo) a discutir la necesidad de desarrollar un curso de R para principiantes. No solo porque es necesario unirse en torno a un projecto como es el R, sino que es una oportunidad para muchos cientificos (como
2011 May 12
1
Saving misclassified records into dataframe within a loop
Greetings R world, I know some version of the this question has been asked before, but i need to save the output of a loop into a data frame to eventually be written to a postgres data base with dbWriteTable. Some background. I have developed classifications models to help identify problem accounts. The logic is this, if the model classifies the record as including variable X and it turns out
2008 Apr 27
2
R instalation on Ubuntu 7.10
Se ha borrado un texto insertado con un juego de caracteres sin especificar... Nombre: no disponible Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080427/53a3d8c7/attachment.pl
2010 Dec 13
2
rpart.object help
Hi, Suppose i have generated an object using the following : fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis) And when i print fit, i get the following : n= 81 node), split, n, loss, yval, (yprob) * denotes terminal node 1) root 81 17 absent (0.7901235 0.2098765) 2) Start>=8.5 62 6 absent (0.9032258 0.0967742) 4) Start>=14.5 29 0 absent (1.0000000
2009 Dec 14
1
RPART - printing full splitting rule number on tree plot
Dear R-users I am using RPART package to get regression trees. However having trouble getting the text function to put the full splitting rule number on the plot, instead to puts it in scientific notation. When a covariate has 1e4 or greater number of digits then the splitting rule number displayed on the plot is in scientific notation. But print.rpart displays the splitting rules in full.
2012 Mar 04
1
rpart package, text function, and round of class counts
I run the following code: library(rpart) data(kyphosis) fit <- rpart(Kyphosis ~ ., data=kyphosis) plot(fit) text(fit, use.n=TRUE) The text labels represent the count of each class at the leaf node. Unfortunately, the numbers are rounded and in scientific notation rather than the exact number of examples sorted by that node in each class. The plot is supposed to look like
2007 Jun 15
2
model.frame: how does one use it?
Philipp Benner reported a Debian bug report against r-cran-rpart aka rpart. In short, the issue has to do with how rpart evaluates a formula and supporting arguments, in particular 'weights'. A simple contrived example is ----------------------------------------------------------------------------- library(rpart) ## using data from help(rpart), set up simple example myformula <-
2012 Apr 12
2
enableJIT(2) causes major slow-up in rpart
Hello, Due to exploration of the JIT capabilities offered through the {compiler} package, I came by the fact that using enableJIT(2) can *slow* the rpart function (from the {rpart} package) by a magnitude of about 10 times. Here is an example code to run: library(rpart) require(compiler) enableJIT(0) # just making sure that JIT is off # We could also use enableJIT(1) and it would be fine fo
2010 Mar 07
1
Is there an equivalence of lm's “anova” for an rpart object ?
Simple example: # Classification Tree with rpart library(rpart) # grow tree fit <- rpart(Kyphosis ~ Age + Number + Start, method="class", data=kyphosis) Now I would like to know how can I measure the "importance" of each of my three explanatory variables (Age, Number, Start) in the model? If this was a regression model, I could have looked at p values from the
2009 Feb 25
1
how to label the branches of a tree
Hi, I am using rpart package to fit classification trees. library(rpart) fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis) plot(fit,uniform=T) text(fit, use.n=TRUE) But I am unable to label the branches (not the nodes) of the tree. Can somebody help me out in this? Thank you, Regards Utkarsh Singhal | Amba Research Ph +91 80 3980 8017 | Mob +91 99 0295 8815
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,
2009 Feb 03
5
Large file size while persisting rpart model to disk
I am using rpart to build a model for later predictions. To save the prediction across restarts and share the data across nodes I have been using "save" to persist the result of rpart to a file and "load" it later. But the saved size was becoming unusually large (even with binary, compressed mode). The size was also proportional to the amount of data that was used to create the
2009 Sep 14
1
summary of rpart-Object in tktext window?
Hi, is it possible to put a summary of an rpart-Object into a tktext-window? Here is what I'm trying to do: fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis) tt <- tktoplevel() tex <- tktext(tt) tkpack(tex) tkinsert(tex, "end", summary(fit)) But since the summary of an object is a list, I always get back the following error-message: cannot handle object of
2011 Jul 29
1
help with predict.rpart
? data=read.table("http://statcourse.com/research/boston.csv", , sep=",", header = TRUE) ? library(rpart) ? fit=rpart (MV~ CRIM+ZN+INDUS+CHAS+NOX+RM+AGE+DIS+RAD+TAX+ PT+B+LSTAT) predict(fit,data[4,]) plot only reveals part of the tree in contrast to the results on obtains with CART or C5 -------- Original Message -------- Subject: Re: [R] help with rpart From: Sarah