Displaying 20 results from an estimated 10000 matches similar to: "Fitting a predefined classification tree"
2012 Dec 20
0
R-help Digest, Vol 118, Issue 20
I don't know of one. If building your own you could use rpart with the "maxdepth=1" as
the tool to find the best split at each node.
Terry Therneau
On 12/20/2012 05:00 AM, r-help-request at r-project.org wrote:
> Hi,
>
> I've searched R-help and haven't found an answer. I have a set of data from which I can create a classification tree using
> rpart. However,
2005 Mar 18
1
How to show which variables include in plot of classification tree
Dear all
For my research, I am learning classification now.
I was trying some example about classification tree pakages, such as
tree and rpart, for instance,
in Pima.te dataset have 8 variables (include class=type):
library(rpart)
library(datasets)
pima.rpart <- rpart(type ~ npreg+glu+bp+skin+bmi+ped+age,data=Pima.te,
method='class')
plot(pima.rpart, uniform=TRUE)
text(pima.rpart)
2011 Nov 04
1
Decision tree model using rpart ( classification
Hi Experts,
I am new to R, using decision tree model for getting segmentation rules.
A) Using behavioural data (attributes defining customer behaviour, ( example
balances, number of accounts etc.)
1. Clustering: Cluster behavioural data to suitable number of clusters
2. Decision Tree: Using rpart classification tree for generating rules for
segmentation using cluster number(cluster id) as target
2008 Jan 29
2
rpart error when constructing a classification tree
I am trying to make a decision tree using rpart. The function runs very
quickly considering the size of the data (1742, 163). When I call the
summary command I get this:
> summary(bookings.cart)
Call:
rpart(formula = totalRev ~ ., data = bookings, method = "class")
n=1741 (1 observation deleted due to missingness)
CP nsplit rel error
1 0 0 1
Error in yval[, 1] :
2006 Aug 24
0
Classification tree with a random variable
Hi,
I am planning on using classification trees to build a predictive model for data which includes a random variable. I intend to use the R functions 'rpart' (and potentially also 'randomForest' and 'bagging').
I have a data set with 390 data points. The response variable is binary. There are a large number of variables (>20, both categorical and continuous). The
2005 Jan 25
0
Estimating error rate for a classification tree
Hi,
I created an rpart object and pruned the tree using
1-SE rule. I used 10-fold cross validation while
creating the tree. Then, I extracted the
cross-validated predictions for my data points using
xpred.rpart and obtained some statistics like
precision, recall, overall error rate, etc.
However, these values change each time I run
xpred.rpart because of the random shuffling going on
before
2012 Mar 05
1
decision/classification trees with fewer than 20 objects
Hi!
I'm trying to construct and plot a decision tree to class a set of only 8 objects and tried to use the rpart and tree function, but get a error message both times:
rpart: fit is not a tree, just a root
tree: cannot plot singlenode tree
I read in the post 'question regression trees' that rpart doesn't split a set of fewer than 20 objects...so I guess the same holds true for
2011 Aug 08
1
Classification trees problem.
Hello Everyone,
I'm doing a Classification trees with categorical explanatory variables using library rpart and I would like to do a prediction for some data imputs. I don't know where's a function or how can I do it?. Is there someone can help ?? ¿. Here's the code that I'm using.
library(rpart)
fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis)
plot(fit)
2010 Dec 14
1
rpart - how to estimate the “meaningful” predictors for an outcome (in classification trees)
Hi dear R-help memebers,
When building a CART model (specifically classification tree) using rpart,
it is sometimes obvious that there are variables (X's) that are meaningful
for predicting some of the outcome (y) variables - while other predictors
are relevant for other outcome variables (y's only).
*How can it be estimated, which explanatory variable is "used" for which of
2007 Jan 25
1
'Fitting' a model at predefined points
Hi,
I have a linear model ("mod1 <- lm(V3~V1+V2) and I would like to get the
model's prediction at values of V1 and V2 not included in the original
sample.
samp <- read.table("data.dat",nrows=100)
attach(samp)
out.poly <- lm(V3 ~ V1 + V2)
If I try to use out.poly to predict values for the function I run into
problems. It seems that it isn't possible to use a new
2017 Jun 13
2
Classification and Regression Tree for Survival Analysis
I am trying to use the CART in a survival analysis. I have three variables of interest (all 3 ordinal - x, y and z, each of them with 5 categories) from which I want to make smaller groups (just an example 1st category from X variable with the 2nd and 3rd categories from the Y category and 2, 3 and 4 categories from the Z category etc) based on their, let's say, association with mortality.
Now
2010 Aug 13
1
decision tree finetune
My decision tree grows only with one split and based on what I see in
E-Miner it should split on more variables. How can I adjust splitting
criteria in R?
Also is there way to indicate that some variables are binary, like variable
Info_G is binary so in the results would be nice to see "2) Info_G=0"
instead of "2) Info_G<0.5".
Thank you in advance!
And thanks for Eric who
2005 Oct 18
1
Memory problems with large dataset in rpart
Dear helpers,
I am a Dutch student from the Erasmus University. For my Bachelor thesis I
have written a script in R using boosting by means of classification and
regression trees. This script uses the function the predefined function
rpart. My input file consists of about 4000 vectors each having 2210
dimensions. In the third iteration R complains of a lack of memory,
although in each iteration
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
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
2009 Mar 03
1
Predefined viables
Hi all,
Does anyone knows how to add a new variable to the predefined variables
sent by asterisk to AGI script?
regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090304/80ba7bd7/attachment.htm
2009 Dec 11
1
Array of legend text with math symbols from predefined variables
Hello,
I am trying to include legend text with math symbols from a predefined
character variable that is read in from a file.
?
If there is only one line of text in the legend, the following, although
cumbersome, works for me:
? > LegendText = " 'U' [infinity], '=10 m/s' "?? # (read in from a file)
??> LegendName = paste("bquote(paste(",LegendText,
2011 May 05
1
[caret package] [trainControl] supplying predefined partitions to train with cross validation
Hi all,
I run R 2.11.1 under ubuntu 10.10 and caret version 2.88.
I use the caret package to compare different models on a dataset. In
order to compare their different performances I would like to use the
same data partitions for every models. I understand that using a LGOCV
or a boot type re-sampling method along with the "index" argument of
the trainControl function, one is able to
2009 Dec 16
2
rcart - classification and regression trees (CART)
Hi,
I am trying to use CART to find an ideal cut-off value for a simple
diagnostic test (ie when the test score is above x, diagnose the condition).
When I put in the model
fit=rpart(outcome ~ predictor1(TB144), method="class", data=data8)
sometimes it gives me a tree with multiple nodes for the same predictor (see
below for example of tree with 1 or multiple nodes). Is there a way
2012 Feb 16
1
how to get r-squared for a predefined curve or function with "other" data points
hello mailing list!
i still consider myself an R beginner, so please bear with me if my
questions seems strange.
i'm in the field of biology, and have done consecutive hydraulic
conductivity measurements in three parallels ("Sample"), resulting in three
sets of conductivity values ("PLC" for percent loss of conductivity,
relative to 100%) at multiple pressures