search for: impur

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

Did you mean: imgur
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 p...
2017 Apr 08
2
Splitting C/C++ code into pure and side-effecting code
...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 to achieve this by adding something like __attribute__((annotate("pure"))) and __attribute__((annotate("call_impure"))) and how much effort will it be to add such a functionality. Basically, I want "pure" attribute to be sticky, in the sense that every function that's pure, can only call pure code unless explicitly marked inside the function to make impure call. For example, the following cod...
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 &...
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...
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.,...
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.se...
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 eac...
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"...
2012 Sep 20
3
[LLVMdev] sign extensions, SCEVs, and wrap flags
...d 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 which shouldn't have > any impure type casting operations. > > This can all be avoided by limiting your optimization to code that uses > pointer-size loop counters! > > -Andy > The array indices are out of my control; depends on the code people write. If they'd use long ints for everything, life would be goo...
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...
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: # 'newda...
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
...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 which shouldn't have > any impure type casting operations. > > This can all be avoided by limiting your optimization to code that uses > pointer-size loop counters! > > -Andy > > > The array indices are out of my control; depends on the code people write. If > they'd use long ints for eve...
2019 Aug 28
2
Conventions: Use of globals and main functions
...Organizing the functions we want to be pure so that they are not defined in the same environment in which they are called actually helps to ensure function purity in the input direction, since those functions will not have lexical-scope access to called variables. (That is, you may have written an impure function without realizing it; organizing functions so they are not defined in the same environment as when they are called helps to ensure purity.) Perhaps I am mistaken, but in either case, your points actually favor a main() idiom, unless you take using main() to mean using main() with extra b...
2012 Sep 20
0
[LLVMdev] sign extensions, SCEVs, and wrap flags
...now 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 which shouldn't have any impure type casting operations. This can all be avoided by limiting your optimization to code that uses pointer-size loop counters! -Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120919/c7b80b55/attachmen...
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
...nsider 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 which shouldn't have >> any impure type casting operations. >> >> This can all be avoided by limiting your optimization to code that uses >> pointer-size loop counters! >> >> The array indices are out of my control; depends on the code people >> write. If they'd use long ints for ever...
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 li...
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...