search for: impurity

Displaying 20 results from an estimated 38 matches for "impurity".

Did you mean: impunity
2017 Apr 09
2
Splitting C/C++ code into pure and side-effecting code
Hi Suman, I think you can ascertain pureness automatically leveraging the compiler instead of manually tagging attribute to each method and call-site. It would seem like impurity should be a transitive attribute. So this would conflict with below. __attribute__((annotate("pure"))) int add(uint32_t a, uint32_t b) { // impure by calling printf... ... printf("%d + %d = %d\n", a, b, c) __attribute__((annotate("call_ impure"))); Finding puri...
2017 Apr 08
2
Splitting C/C++ code into pure and side-effecting code
Hello folks, I'm not a compiler expert or subscribed to this mailing list, but I have a unique problem. I need to split a large piece of C/C++ code into two separate libraries: one library that only has pure code (i.e., code that doesn't require operating system interactions) and other library that can have both pure code and side-effecting code. I was was wondering if it's possible
2010 Oct 13
5
Regular expression to find value between brackets
Hi, this should be an easy one, but I can't figure it out. I have a vector of tests, with their units between brackets (if they have units). eg tests <- c("pH", "Assay (%)", "Impurity A(%)", "content (mg/ml)") Now I would like to hava a function where I use a test as input, and which returns the units like: f <- function (x) sub("\\)", "", sub("\\(", "",sub("[[:alnum:]]+","",x))) this should give &quo...
2011 Jun 21
0
How does rpart computes "improve" for split="information"?? (which seems to be different then the "gini" case)
...plit='information' parameter. Thanks to Professor Atkinson help, I was able to find how this is done in the case that split='gini'. By following the explanation here: http://mayoresearch.mayo.edu/mayo/research/biostat/upload/61.pdf But the calculation of the information (deviance) impurity is still a mystery for me. Might you help with explaining it? Bellow is some R code simply showing how the gini is computed (and how the information is not as clear) # creating data set.seed(1324) y <- sample(c(0,1), 20, T) x <- y x[1:5] <- 0 # manually making the first split obs_L &l...
2004 Jun 04
1
rpart
Hello everyone, I'm a newbie to R and to CART so I hope my questions don't seem too stupid. 1.) My first question concerns the rpart() method. Which method does rpart use in order to get the best split - entropy impurity, Bayes error (min. error) or Gini index? Is there a way to make it use the entropy impurity? The second and third question concern the output of the printcp() function. 2.) What exactly are the cps in that sense here? I assumed them to be the treshold complexity parameters as in Breiman et al., 19...
2011 Jun 13
1
In rpart, how is "improve" calculated? (in the "class" case)
...ct: "improve, which is the improvement in deviance given by this split" >From what I understand, that would mean that the "improve" value should not be different when using different "split" switches. Since it is different, then I suspect that it is reflecting the impurity measure somehow, but I can't seem to understand how exactly. Bellow is some simple R code showing the result for a simple classification tree, with what the function outputs, and what I would have expected to see if "improve" were to simply reflect the change in impurity. set.seed(...
2007 Aug 16
1
Regression tree: labels in the terminal nodes
...ion tree graphs. In the terminal nodes I am up to now able to indicate the number of values (n) and the mean of all values in this terminal node by the command > text(tree, use.n=T, xpd=T) Yet I would like to indicate automatically in the output graph of the tree some quality measure, e.g. impurity (or standard deviation .....) and a character to identify which cases are in one terminal node, e.g. given a ID number or name. Until now I did not discover in my R help scripts or in the R programm help how to do it. So I calculate impurity by hand, and I'm identifying the cases in each n...
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
2001 May 22
1
Surrogate splits for decision trees
Dear R, Short verse of the question: Is there R code which will calculate surrogate splits and/or delta impurity for decision trees at each node? Long Version: I have local, legacy code which I use to calculate my decision trees. I would like to switch to R, but as I understand it surrogate splits are not implemented. Surrogate splits and feature ranking are described in Breiman et al "CART" 198...
2012 Sep 20
3
[LLVMdev] sign extensions, SCEVs, and wrap flags
On Wed, Sep 19, 2012 at 6:30 PM, Andrew Trick <atrick at apple.com> wrote: > > On Sep 19, 2012, at 2:18 PM, Preston Briggs <preston.briggs at gmail.com> > wrote: > > On Tue, Sep 18, 2012 at 10:59 PM, Andrew Trick <atrick at apple.com> wrote: > >> >> On Sep 18, 2012, at 8:21 PM, Preston Briggs <preston.briggs at gmail.com> >> wrote:
2003 Nov 23
2
R Home Page Graphic Competition
...also receive *free registration* for the useR! 2004 conference (http://www.ci.tuwien.ac.at/Conferences/useR-2004/) The original image should be produced using R. Images which have been "jazzed up" using a graphics program such as gimp will also be considered (but may suffer an "impurity" penalty in the judging). Please send images and source code (and data) used to produce them, to paul at stat.auckland.ac.nz The competition will last until January 31st 2004, or until we die waiting, whichever happens first. R-core reserves the right to decide that the R user base is jus...
2012 Nov 01
0
oblique.tree : the predict function asserts the dependent variable to be included in "newdata"
...names(m); var_x_names <- var_names[-length(var_names)] n_train <- floor(N/2); n_test <- N - n_train; train <- m[1:n_train,]; test <- m[-(1:n_train),]; bot <- oblique.tree(formula = y ~., data = train, oblique.splits = "on", variable.selection = "none", split.impurity = "gini"); ### If the dependent variable is excluded from `newdata` the code ends up with this error : # Error in model.frame.default(formula = as.formula(eval(object$call$formula)), : # variable lengths differ (found for 'X1') # In addition: Warning message: # 'newdata&...
2010 May 05
1
randomForest: predictor importance (for regressions)
I have a question about predictor importances in randomForest. Once I've run randomForest and got my object, I get their importances: rfresult$importance I also get the "standard errors" of the permutation-based importance measure: rfresult$importanceSD I have 2 questions: 1. Because I am dealing with regressions, I am getting an importance object (rfresult$importance) with two
2012 Sep 20
0
[LLVMdev] sign extensions, SCEVs, and wrap flags
Hi, > Sorry, I probably led you astray. No-self-wrap is useful for determining > trip count, but does not mean that sign/zero extension can be hoisted. > > But if you run your analysis after -indvars, the sign-extension should be > removed if possible. The algorithm walks the derived induction variables > specifically looking for add nsw/nuw and replacing
2019 Aug 28
2
Conventions: Use of globals and main functions
I appreciate the well-thought-out comments. To your first point, I am not sure what "glattering" means precisely (a Google search revealed nothing useful), but I assume it means something to the effect of overfilling the main namespace with too many names. Per Norm Matloff's counterpoint in The Art of R Programming regarding this issue, this is mostly avoided by well-defined,
2012 Sep 20
0
[LLVMdev] sign extensions, SCEVs, and wrap flags
On Sep 19, 2012, at 2:18 PM, Preston Briggs <preston.briggs at gmail.com> wrote: > On Tue, Sep 18, 2012 at 10:59 PM, Andrew Trick <atrick at apple.com> wrote: > > On Sep 18, 2012, at 8:21 PM, Preston Briggs <preston.briggs at gmail.com> wrote: > >> Given the following SCEV, >> >> (sext i32 {2,+,1}<nw><%for.body> to i64) >>
2005 Apr 23
7
OpenSSH is not asking for passwords.
I am trying to use shfs to mount a remote root filesystem for a diskless workstation. The system downloads its kernel and initrd from a server. I have tried repeatedly to get a working installation of ssh on the initrd with no success. I finally got ssh to connect to the server. Normally when I use ssh the session goes as follows [arrummzen at localhost LFS-BOOK-6.0-HTML]$ ssh 192.168.11.10 -l
2012 Sep 22
0
[LLVMdev] sign extensions, SCEVs, and wrap flags
>> Are all your array indices uniformly sign-extended? >> I don't know if this is a good idea, but why can't you consider the sext >> operand the array index rather than the gep operand? If you prove that the >> narrow indices are disjoint, then the extended indices must be disjoint. >> SCEV operations should work fine on the narrow indices
2006 Feb 16
0
sums of absolute deviations about the median as split function in rpart
Dear R community, as stated in Breiman et.al. (1984) and De'Ath & Fabricius (2000) using sums of absolute deviations about the median as an impurity measure gives robust trees. I would like to use this method in rpart. Has somebody already tried this method in rpart? Is there maybe already a script available somewhere? I am aware of the possibility to define usersplits myself with eval, split and init. As an R beginner, though, I would like...
2006 Nov 20
0
rpart
...90, (0 missing) x9 < 1.5 to the right, improve=0.8054428, (0 missing) I used the default values for the "parms" parameter. So, loss is the unity matrix, prior are estimated by (5/6, 1/6) and split is "Gini". Why is the improve of the first split 1.228? My calculation: Impurity measure at the root node: 1/6*5/6=5/36 Node 2: 185/211*26/211, weight: 211/600 Node 3: 315/389*74/389, weight: 389/600 -> improve=5/36 - 211/600 * 185/211*26/211 - 389/600 * 315/389*74/389 = 0.001023743 Is there any normalisation? If I use matrix(c(0,3,3,0),nrow=2) as loss matrix, I get the sam...