It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Is there any R package (or C++) that has sieve bootstrap? (The bootstrap is a method for estimating the distribution of an estimator or test statistic
by resampling one’s data or a model estimated from the data. This is more complicated when the data are a time series because bootstrap
sampling must be carried out in a way that suitably captures the dependence structure of the data
generation process). For time series there is block bootstrap in the package: boot and Maximum Entropy Bootstrap in the package meboot but I would also like to look at sieve bootstrap which I have heard produces better results than the block. I have done ???sos and http://www.rseek.org
but could not find anything.
Thanks for your help.
This paper appears to indicate that the VLMC package implements the sieve bootstrap with variable length Markov chains.
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I'm using R for the first time to learn how to write classification algorithms. I'm mainly learning from the O'reilly book Machine Learning for Hackers.
There's tons of info in R, R documentation, ebooks, and my book about writing functions. However, there are snippets of code in the book that use the word function in a way that does not seem to conform to my understanding of the use of function. For example:
all.spam <- sapply(spam.docs, function(p) get.msg(paste(spam.path,p,sep="")))
where get.msg is a user defined function, sapply is from base R, and p is not defined anywhere in their code. There's no explanation in the book and I also tried searching and asking other R users in my company to no avail.
Any insight? Thanks in advance. By the way, in RStudio the word function is bright blue when used in this way.
In R, you define anonymous and named functions using the same syntax, so your example:
all.spam <- sapply(spam.docs, function(p) get.msg(paste(spam.path,p,sep="")))
Is equivalent to:
my_spam_func <- function(p) {
get.msg(paste(spam.path, p, sep=""))
}
all.spam2 <- sapply(spam.docs, my_spam_func)
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I would like to generate an interactive plot with R, for example an xyplot that shows information of the data points on mouseover, and I've read about D3. I would like to be able to write R code to generate the D3 html pages automatically. Is there any R package able to do that?
I've seen there is a r2d3 package on github but I am not sure how far that project is. Any ideas?
Looks to be fairly early in its development: https://github.com/hadley/r2d3. Hadley generally makes announcements when things are ready to test and then puts his packages on CRAN when they are ready for prime-time. (There's also confusion in that some versions of D3 on Github are named r2d3 when they have nothing to do with R): https://www.google.com/url?q=https://github.com/mhemesath/r2d3&sa=U&ei=Ig-YULraMueimQWxhYHgCA&ved=0CAwQFjAC&client=internal-uds-cse&usg=AFQjCNGe9p5iKH6deoHDpd2yKHJds8Qdow
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Say, you have a Newton Method algorithms with 2 parameters of interest(a,b).
And I would like to plot their domain of convergence with x-axis = a, y-axis = b. Is there a really fast and simple to do this??? Any suggestions?
My algorithm will basically converge for some values of a & b. If I input (a,b), it will return (the number of iterations , value of a that it converge to, value of b that it converge to). Right now, I am thinking of setting up a for loop within another for loop, which run through all possible values of b first holding a fixed, and all possible values that a will converge holding b fixed.
However, my trouble is: how to identify whether a & b is converging or not. And is there a better way than using nested for loops????
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
In many programming problems (e.g. some Project Euler problems) we are asked to report the answer as the remainder left after dividing the answer by 1,000,000,007.
Why not any other number?
Edit:
2 years later, here's what I know: the number is a big prime, and any answer to such a question is so large that it makes sense to report a remainder instead (as the number may be too large for a native datatype to handle).
Let me play a telepathist. 1000...7 are prime numbers and 1000000007 is the biggest one that fits in 32-bit integer. Since prime numbers are used to calculate hash (by finding the remainder of the division by prime), 1000000007 is good for calculating 32-bit hash.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
i assume that we have 2 labeled graphs G and T and the algorithm determine if G a subgraph of T and the corresponding vertices in the main graphT and the subgraph G should have same label
That problem is called "subgraph isomorphism" and it is NP-complete (and so likely to be hard). Do you need a general solution for this, or just for a particular graph G? The second case is much easier. There is some general information about algorithms here. There is a version of one of the algorithms (actually, for a more general problem) in the Boost Graph Library (see documentation here).
A general answer for a general question: the problem you want to solve is known as 'subgraph isomorphism.' Have a look here for further references: http://en.wikipedia.org/wiki/Subgraph_isomorphism_problem .