Displaying 20 results from an estimated 1000 matches similar to: "using rpart with a tree misclassification condition"
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
2011 Sep 02
2
misclassification rate
Hi users
I'm student who is struggling with basic R programming. Would you please
help me with this problem.
"My english is bad" I hope that my question is clear:
I have a matrix in wich there are two colmns( yp, yt)
Yp: predicted values from my model.
yt: true values ( my dependante variable y is a categorical;3 modalities
(0,1,2)
I don't know how to procede to calculate the
2002 Jan 05
1
computing misclassification table for tree objects
I have a classification tree that I computed via the tree function
(in the tree package). I'd like to compute a misclassification table
(if that's the right term) on the data used to compute the tree. That
is, I want to compute a table with the different classes (i.e.,levels of the
response factor) on the rows and the columns, and where entry [i,j] is
the number of times the tree
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
2009 Dec 01
2
Distance between sets of points in transformed environmental space
Dear friends,
I have several sets of points in a transformed environmental space. Each set
of points can be represented as a cloud in the environmental space.
This space is spanned by n coordinates, corresponding to the first n PCs of 36
PCs of some environmental variables (12 monthly minimum temperatures, 12
monthly maximum temperature, 12 monthly precipitations).
I would like to calculate
2007 Jun 16
0
Function for misclassification rate/type I,II error??
HI
Is there any function in R that tells us error rate(misclassification rate)
for logistic regression type classification?
i also want to know the function to determine type I and type II error.
I have found a link where "misclass" and "confusion" are used. But I dont
know the package name.
http://alumni.media.mit.edu/~tpminka/courses/36-350.2001/lectures/day32/
2003 Sep 29
1
CP for rpart
Hi All,
I have some questions on using library rpart. Given my data below, the
plotcp gives me increasing 'xerrors' across different cp's with huge xstd
(plot attached). What causes the problem or it's not a problem at all? I am
thinking 'xerror's should be decreasing when 'cp' gets smaller. Also what
the 'xstd' really tells us? If the error bars for
2009 May 12
1
questions on rpart (tree changes when rearrange the order of covariates?!)
Greetings,
I am using rpart for classification with "class" method. The test data is
the Indian diabetes data from package mlbench.
I fitted a classification tree firstly using the original data, and then
exchanged the order of Body mass and Plasma glucose which are the
strongest/important variables in the growing phase. The second tree is a
little different from the first one. The
2009 May 22
1
bug in rpart?
Greetings,
I checked the Indian diabetes data again and get one tree for the data with
reordered columns and another tree for the original data. I compared these
two trees, the split points for these two trees are exactly the same but the
fitted classes are not the same for some cases. And the misclassification
errors are different too. I know how CART deal with ties --- even we are
using the
2010 Jan 21
0
mspath analyzes transitions between multiple state with history dependence
Now available on CRAN.
Package: mspath
Title: Multi-state Path-Dependent Models in Discrete Time
Description: Functions for fitting path-dependent (non-Markov)
multi-state models to categorical processes observed at arbitrary
times, optionally with misclassified responses, and covariates on
transition or misclassification rates. Uses discrete-time
approximation. Based on the Jackson's
2010 Jan 21
0
mspath analyzes transitions between multiple state with history dependence
Now available on CRAN.
Package: mspath
Title: Multi-state Path-Dependent Models in Discrete Time
Description: Functions for fitting path-dependent (non-Markov)
multi-state models to categorical processes observed at arbitrary
times, optionally with misclassified responses, and covariates on
transition or misclassification rates. Uses discrete-time
approximation. Based on the Jackson's
2010 Apr 30
1
how is xerror calculated in rpart?
Hi,
I've searched online, in a few books, and in the archives, but haven't seen
this. I believe that xerror is scaled to rel error on the first split.
After fitting an rpart object, is it possible with a little math to
determine the percentage of true classifications represented by a xerror
value? -seth
--
View this message in context:
2008 Feb 24
1
what missed ----- CART
Hi all,
Can anyone who is familar with CART tell me what I missed in my tree code?
library (MASS)
myfit <- tree (y ~ x1 + x2 + x3 + x4 )
# tree.screens () # useless
plot(myfit); text (myfit, all= TRUE, cex=0.5, pretty=0)
# tile.tree (myfit, fgl$type) # useless
# close.screen (all= TRUE) # useless
My current tree plot resulted from above code shows as:
2006 Oct 17
1
Some questions on Rpart algorithm
Hello:
I am using rpart and would like more background on how the splits are made
and how to interpret results - also how to properly use text(.rpart). I have
looked through Venables and Ripley and through the rpart help and still have
some questions. If there is a source (say, Breiman et al) on decision trees
that would clear this all up, please let me know. The questions below
pertain to a
2011 Mar 29
1
plotting several ROC curves on the same graph
Hello
I am trying to make a graph of 10 different lines built each from 4
different
segments and to add a darker line that will represent the average of all
graphs
- all in the same plot.Actually each line is a ROC plot
The code I'm using for plotting one line is as follows:
logit.roc.plot <- function(r, title="ROC curve") {
old.par <- par(no.readonly = TRUE);
2011 Oct 25
2
Logistic Regression - Variable Selection Methods With Prediction
Hello,
I am pretty new to R, I have always used SAS and SAS products. My
target variable is binary ('Y' and 'N') and i have about 14 predictor
variables. My goal is to compare different variable selection methods
like Forward, Backward, All possible subsests. I am using
misclassification rate to pick the winner method.
This is what i have as of now,
Reg <- glm (Graduation ~.,
2008 Mar 06
1
Rpart and bagging - how is it done?
Hi there.
I was wondering if somebody knows how to perform a bagging procedure on a
classification tree without running the classifier with weights.
Let me first explain why I need this and then give some details of what I
have found out so far.
I am thinking about implementing the bagging procedure in Matlab. Matlab
has a simple classification tree function (in their Statistics toolbox) but
2012 Aug 19
1
e1071 - tuning is not giving the best within the range
Hi everybody,
I am new in e1071 and with SVMs. I am trying to understand the performance
of SVMs but I face with a situation that I thought as not meaningful.
I added the R code for you to see what I have done.
/set.seed(1234)
data <- data.frame( rbind(matrix(rnorm(1500, mean = 10, sd = 5),ncol = 10),
matrix(rnorm(1500, mean = 5, sd = 5),ncol = 10)))
class <- as.factor(rep(1:2,
2009 Jun 09
3
rpart - the xval argument in rpart.control and in xpred.rpart
Dear R users,
I'm working with the rpart package and want to evaluate the performance of
user defined split functions.
I have some problems in understanding the meaning of the xval argument in
the two functions rpart.control and xpred.rpart. In the former it is defined
as the number of cross-validations while in the latter it is defined as the
number of cross-validation groups. If I am
2009 Jul 23
1
Help with Loop!
Dear experts,
I'm new in R and trying to learn by writing a version of the Perceptron
Algorithm. How can I tell in the code below to stop the iteration when the
condition in the "for loop" is not satisfied for all training examples?
Thanks in advance for your help!
## Generate a linearly separable data set in R2
sample <- as.data.frame(cbind(runif(n=100),runif(n=100)))