search for: evalfunc

Displaying 8 results from an estimated 8 matches for "evalfunc".

2005 Dec 08
0
Genetic Algorithms with rbga.bin using AIC as the evalFunc
...knowledge of R for linear modeling and basic statistics, I cannot understand the two examples provided with the documentation for rbga.bin (http://finzi.psych.upenn.edu/R/library/genalg/html/rbga.bin.html). What's particularly confusing is that I can't see how the evaluation function (evalFunc) can vary with each iteration of the rbga.bin. Can anybody help me design a command that incorporates the AIC() value of a linear model (where the inclusion of selected variables in the model is dependent on the current iteration of the rbga.bin function) as the evalFunc? Otherwise, is there a...
2011 Sep 22
2
suggestions argument in rbga function in genalg package
Would someone be so kind as to provide example code where they use the suggestions argument in the rgba function In genalg? I can't get it to work. The following code works just fine: GenFit <-rbga(Lower, Upper, evalFunc = evaluate) Lower and Upper are each numeric vectors with 7 elements. Evaluate is an objective function. However, when I want to use a suggested chromosome, I get an error message. My code is start <- c(1,0.1,10, 100,1,100,1) suggestions <- list(start) GenFit <-rbga(Lower, Upper, sugge...
2014 Sep 11
2
[LLVMdev] Fail to load a pointer to a function inside MCJIT-ed code when it is reload from ObjectCache
Thank you Lang. I attached the ELF object file here for your reference. Here is the IR dump of JittedOpExpr LLVM function. IrExprGetValue1 LLVM function calls to external function expr->evalfunc(expr, econtext, isNull, isDone); which should be pointed by 0x7fe4801fa1f8. However, only the first time MCJIT generated object point to expr->evalfunc but second time when program load from object cache does not. In the second time, before program load object cache, brand new llvm::Module and l...
2014 Sep 11
2
[LLVMdev] Fail to load a pointer to a function inside MCJIT-ed code when it is reload from ObjectCache
Hi, All I have a problem to reuse mcjit jitted code loaded from ObjectCache from a file. In the first run, I use MCJIT generate function JittedOpExpr object code as following and it runs OK. 0x7fe4801fa1f8 at instruction 0x00007fe4cc6c2014 points to 0x69382E which is the beginning of ExecEvalVar function. Then I save the object code into a file after implementing notifyObjectCompiled method.
2011 Mar 23
3
Sweave: multiple graphic formats, e.g. win.metafile
...src <- deparse(setup) epsline <- grep("eps", setupsrc) setupsrc[epsline] <- sub("eps = TRUE", "eps = FALSE, emf = FALSE", setupsrc[epsline]) setup <- eval(parse(text=setupsrc)) # 'makeRweaveLatexCodeRunner' function makeruncode <- function(evalFunc=utils::RweaveEvalWithOpt) { runcode <- utils:::RweaveLatexRuncode runcodesrc <- deparse(runcode) epsline1 <- grep("cat(.. eps..)", runcodesrc) runcodesrc <- append(runcodesrc, " if (options$emf) cat(\" emf\")", after=epsline1) epsline2...
2008 Oct 16
1
Rscript -e, Sweave and tempdir()
...eas? Thanks Paul. EARLIER EMAIL FROM F. LEISCH (AUTHOR OF SWEAVE) ___________________________________ It's not figures but text output which is collected via temporary files. The corresponding code in Sweave is: tmpcon <- file() sink(file=tmpcon) err <- NULL if(options$eval) err <- evalFunc(ce, options) cat("\n") # make sure final line is complete sink() output <- readLines(tmpcon) close(tmpcon) So you need to figure out where file() opens the anoymous temporary file on your operating system. His is the same place as a call to tempdir() shows, e.g. on my Linux box: R&g...
2007 Feb 18
3
User defined split function in rpart
Dear R community, I am trying to write my own user defined split function for rpart. I read the example in the tests directory and I understand the general idea of the how to implement user defined splitting functions. However, I am having troubles with addressing the data frame used in calling rpart in my split functions. For example, in the evaluation function that is called once per node,
2010 May 28
1
Does Sweave run in the global environment ?
Hello It seems that sweave always runs in the global environment. I want to run sweave from within a function, and pass a variable into sweave, however when I do this, sweave doesn't see the variable. Here's my example test_sweave.Rnw file |% \documentclass[a4paper]{article} \usepackage[OT1]{fontenc} \usepackage{Sweave} \begin{document} \title{Test Sweave Document} \author{Paul