Displaying 20 results from an estimated 3000 matches similar to: "exact the variables used in tree construction"
2010 May 11
1
how to extract the variables used in decision tree
HI, Dear R community,
How to extract the variables actually used in tree construction? I want to
extract these variables and combine other variable as my features in next
step model building.
> printcp(fit.dimer)
Classification tree:
rpart(formula = outcome ~ ., data = p_df, method = "class")
Variables actually used in tree construction:
[1] CT DP DY FC NE NW QT SK TA WC WD WG WW
2010 Apr 29
1
variable importance in Random Forest
HI, Dear Andy,
I run the RandomFOrest in R, and get the following resutls in variable
importance:
What is the meaning of MeanDecreaseAccuracy and MeanDecreaseGini?
I found they are raw values, they are not scaled to 1, right?
Which column if most similar to the variable rel.influence in Boosting?
Thanks so much!
> fit$importance
0 1
2010 Dec 16
1
my function does not work for large data set
Dear R community,
I have one function, it works for small data set, but does not work on large
data set, can anyone help me with this?
> #creat new variable by dividing each aa dimer by total_length.
> imper<-function(x, file) {
+ round(x/file$length, 5)
+ }
> dim(test)
[1] 999 2402
> test[varname[2:2401]]<-
2010 Sep 07
1
change the for loops with lapply
cv.fold<-function(i, size=3, rang=0.3){
cat('Fold ', i, '\n')
out.fold.c <-((i-1)*c.each.part +1):(i*c.each.part)
out.fold.n <-((i-1)*n.each.part +1):(i*n.each.part)
train.cv <- n.cc[-out.fold.c, c(2:2401, 2417)]
train.nv <- n.nn[-out.fold.n, c(2:2401, 2417)]
train.v<-rbind(train.cv, train.nv) #training data for feature
2010 May 26
1
how to Store loop output from a function
HI, Dear R community,
I am writing the following function to create one data set(*tree.pred*) and
one vector(*valid.out*) from loops. Later, I want to use the data set from
this loop to plot curves. I have tried return, list, but I can not use the
*tree.pred* data and *valid.out* vector.
auc.tree<- function(msplit,mbucket) {
* tree.pred<-data.frame()
2010 Apr 21
2
?rpart
HI, Dear R community,
Last friday, I used the codes, it works, but today, it does not run?
> fit.dimer <- rpart(outcome ~., method="class", data=p.df)
Error in `[.data.frame`(frame, predictors) : undefined columns selected
DOEs anyone have comments or suggestions? Thanks in advance!
--
Sincerely,
Changbin
--
[[alternative HTML version deleted]]
2011 Jun 22
1
question about read.columns
HI, Dear R community,
I have a large data set names dd.txt, the columns are: there are 2402
variables.
a1, b1, ..z1, a11, b11, ...z11, a111, b111, ..z111..
IF I dont know the relative position of the columns, but I know I need the
following variables:
var<-c(a1, c1,a11,b11,f111)
Can I use read.columns to read the data into R?
I have tried the following codes, but it does not work
2017 Mar 19
2
outer not applying a constant function
Hi,
the function outer can not apply a constant function as in the last line of the following example:
> xg <- 1:4
> yg <- 1:4
> fxyg <- outer(xg, yg, function(x,y) x*y)
> fconstg <- outer(xg, yg, function(x,y) 1.0)
Error in outer(xg, yg, function(x, y) 1) :
dims [product 16] do not match the length of object [1]
Of course there are simpler ways to construct a constant
2017 Mar 20
1
outer not applying a constant function
> Or is this a bad idea?
I don't like the proposal. I have seen code like the following (in
fact, I have written such code, where I had forgotten a function was
not vectorized) where the error would have been discovered much later
if outer() didn't catch it.
> outer(1:3, 11:13, sum)
Error in outer(1:3, 11:13, sum) :
dims [product 9] do not match the length of object [1]
2010 Apr 28
0
relative influence plot
HI, Dear Greg,
I have one question about the variable relative influence plot: THE
following is the rel.inf value of 25 variables, but wen I plot, not all the
variables are labeled.
i.e. num_genes, wg, hydrophob_per etc are not labeled on the y-axis. also
the variables are labeled vertically, can it be labeled horizontally just
like the summary table?
Thanks!
> summary(gbm1,
2010 Apr 19
0
help in output file
HI, Dear R-community,
I AM using the following codes to grow tree and plot tree:
# Classification Tree with rpart
library(rpart)
pdf(file="/home/cdu/changbin/dimer_tree.pdf")
# grow tree
fit.dimer <- rpart(outcome ~ ., method="class", data=p.dimer[,2:402])
plotcp(fit.dimer) # visualize cross-validation results
# plot tree
plot(fit.dimer, uniform=TRUE,
2018 May 22
3
Cannot delete folder
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, 21 May 2018, Yves Goergen wrote:
>> May 21 10:36:14 mond2 dovecot: imap(yg@****.de): Debug: Namespace :
>> /var/mail/virtual/****.de/yg/.Test doesn't exist yet, using default
>> permissions
>> May 21 10:36:14 mond2 dovecot: imap(yg@****.de): Debug: Namespace : Using
>> permissions from
2017 Apr 12
2
"table(droplevels(aq)$Month)" in manual page of droplevels
Hello,
Inline.
Em 12-04-2017 16:40, Henric Winell escreveu:
> (Let's keep the discussion on-list -- I've added back R-devel.)
>
> On 2017-04-12 16:39, Ulrich Windl wrote:
>
>>>>> Henric Winell <nilsson.henric at gmail.com> schrieb am 12.04.2017
>>>>> um 15:35 in
>> Nachricht <b66fe849-bb8d-f00d-87e5-553f866d57e0 at gmail.com>:
2006 Apr 13
1
Working directory
Hi,
I am a new user of "R", I am trying to read my data in.. "Cervixhc.dat" used
to be in a different directory, now it has been moved to "O:\E&s\APC cervix
FINAL (YG,MC,MD)\Manuscript\Data", but when I ran the following program (in
red) I got an error message "Error in setwd(dir) : cannot change working
directory", and "Error in file(file,
2017 Jun 26
2
Odd behaviour in within.list() when deleting 2+ variables
>>>>> peter dalgaard <pdalgd at gmail.com>
>>>>> on Mon, 26 Jun 2017 13:43:28 +0200 writes:
> This seems to be due to changes made by Martin Maechler in
> 2008. Presumably this fixed something, but it escapes my
> memory.
Yes: The change set (svn -c46441) also contains the following NEWS entry
BUG FIXES
o
2017 Apr 12
3
"table(droplevels(aq)$Month)" in manual page of droplevels
The last line of the example in droplevels' manual page seems to be incorrect to me. I think it should read: "table(droplevels(aq$Month))". Amazingly (I don't understand) both variants seem to produce the same result (R 3.3.3):
---
> aq <- transform(airquality, Month = factor(Month, labels = month.abb[5:9]))
> aq <- subset(aq, Month != "Jul")
>
2009 Jan 10
3
Applying 'lm' in each group
Hi,
I want to do regression in each group. I made the group the following way. Now I want to run regression in each of the three groups..
Suppose ,
x<-c(0.5578196,6.5411662,13.2728619,2.0217271,6.7216176,3.37220617,2.5773252,7.2600583,15.3731026,3.4140288,8.1335874,
15..6476637,4.3014084,9.1224379,18.5605355,4.7448394,11.9296663,18.5866354,12.3797674,18.7572812,2.70433816,2.88924220,
2018 May 21
2
Cannot delete folder
I guess you have had different version(s) or setting(s) in the past, and
you can probably fix this by setting perms to same as the new folders.
Aki
On 21.05.2018 11:46, Yves Goergen wrote:
> I couldn't find anything relevant between all the debug log lines. Is
> that in /var/log/mail.log?
>
> Here's the lines I think are related to creating and deleting the folder:
>
2017 Mar 20
0
outer not applying a constant function
>>>>> Gebhardt, Albrecht <Albrecht.Gebhardt at aau.at>
>>>>> on Sun, 19 Mar 2017 09:14:56 +0000 writes:
> Hi,
> the function outer can not apply a constant function as in the last line of the following example:
>> xg <- 1:4
>> yg <- 1:4
>> fxyg <- outer(xg, yg, function(x,y) x*y)
>> fconstg
2005 Nov 27
1
segfault on write.dcf with gzfile connection
I'm seeing a segfault on x86_64 Linux with the following code:
desc = read.dcf("BAD")
con = gzfile("test.gz", "wt")
write.dcf(desc, file=con)
close(con)
where BAD has a long field (see below for example). The crash happens
inside dummy_vfprintf. I think the issue is that the va_list ap is
modified by the first vsnprintf call