Parallel arbitrary-precision arithmetic library [closed] - math

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I am trying to do modular exponentiation of integers with a very large modulus by repetitive squaring (the power is always a power of 2 in my case, so I believe this is the most efficient way). Thanks to a nice property of my modulus, computing remainder is cheap; the hard part is multiplication.
Currently I run GMP on Intel Core 2 Quad. I would like to make efficient use of the four cores of the processor, but GMP does not scale on SMP environments, so I am looking for a substitute arbitrary-precision arithmetic library. I have found some libraries for parallel computation on matrices, but what I really need is a library for integers.
Does what I am looking for exist?

The answer is yes, multi-threaded arbitrary-precision libraries do exist. But I'm not aware of a single one that is actually public. (with comparable speed to GMP)
For example, the arbitrary-precision libraries that are used in the Pi-computing programs, TachusPi and y-cruncher are capable of multi-threaded arithmetic on large numbers.
However, both libraries are closed source and are not available to the public for use.
Affiliation Disclosure: I'm the author of y-cruncher. So I have written one of such multi-threaded arbitrary-precision libraries myself.

Have you check out http://mpir.org? They claim to be doing this with a variant of GMP, and using GPUs.

Related

Can you recommend a package in R that can be used to count precision, recall and F1-score for multi class classification tasks [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Is there any package that you would recommend which can be used to calculate the precision, F1, recall for multi class classification task in R. I tried to use ROCR but it states that:
ROCR currently supports only evaluation of binary classification tasks
I know that you were looking for a solution in R. That said, this is a link to a nice solution library in Python, using scikit-learn version 0.14. Python is very similar to R in a lot of respects (if you haven't used it before), and this could be a good place to start.
Another place you might want to look, if you are focused on R, is the the PerfMeas package. As I quote, this "Package implements different performance measures for
classification and ranking tasks. AUC, precision at a given recall, F-score for single and multiple classes are available."

Distributed computing in R [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I worked out an estimator, and I would like check its performance by doing simulation studies with R. I want to repeat the experiment for 500 times. Unfortunately, the computation involved in the estimator is sophisticated. Each replication will take 15 minutes on my desktop. I am looking for some distributed computation approaches with R. How should I start? I googled this topic. There are some many posts about this.
I'd suggest starting with the foreach package. If you're using mac or linux the following is the simplest way to do parallel computing:
# First we register a parallel backend. This will work on mac and linux.
# Windows is more complicated, try the `snow` package.
library(doMC)
registerDoMC(cores=4) # substitute for number of cores you want to run on.
# now we can run things in parallel using foreach
foreach (i = 1:4) %dopar% {
# What's in here will run on a separate core for each iteration.
}
You should read the vignette for foreach as it's quite different to for (especially nested loops) and it is also quite powerful for combining results at the end and returning them.
First step with any R problem as broad as this should be checking the CRAN Task Views. Oh look:
http://cran.r-project.org/web/views/HighPerformanceComputing.html
Note that StackOverflow isn't really the place for asking broad questions that are best answered with 'read that documentation over there' or 'why don't you try using tool X?'

Free software for mathematical modeling. Is R a good one? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am looking for a free software for mathematical modeling.
Here is a list of things I might be willing to achieve with this software: Integrating functions, solving differential equations, graph theory, analyzing infinite series, local stability analysis, Taylor series, get eigenvectors, compute the long term behaviour of a system of equations, etc...
Here is a related SE post. I am surprised that nobody is suggesting R. I am currently a R user and already use R for graph theory. Therefore I would appreciate to use R also to make other mathematical modeling. Is R less efficient that Sage, SimPy, Mathematica and others for mathematical modeling? Why? Do you know a manual providing exaplanation for how to make mathematical modeling with R?
Thank you
Sounds like R is your first way to go. It does not make to good sense to compare R with any other tool in such a braod way you are asking for. R packages differ largely in efficiency, some are in fact C tools while others are written in the R language. As a start R can hardly be any wrong and is free.
Matlab might be a stable alternative, Julia is rising but still pre alpha.

Is there any laplacesdemon package equivalent for matlab [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
R provides a very powerful package called laplacesdemon for bayesian inference using the laplace distribution. I was wondering if there is any equivalent package for Matlab?
Thanks!
The question was a bit short so I'm not sure if this is exactly what you are asking for but here goes:
No - there is no Laplacedemon equivalent in Matlab
Yes - there are lots of Matlab packages that partly overlap with LaplaceDemon. As I don't know exactly what you want to do my recommendation is likely to have a high variance. Having established that I suggest that you take a look at http://becs.aalto.fi/en/research/bayes/gpstuff/ :). If you feel comfortable with using MCMC directly, you can take a look at http://helios.fmi.fi/~lainema/mcmc/. (I believe that matlab has some functions for this directly in their statistics or/and econometrics toolboxes)
You could also run R directly from Matlab http://neurochannels.blogspot.se/2010/05/how-to-run-r-code-in-matlab.html or http://rwiki.sciviews.org/doku.php?id=tips:callingr:matlab

Simple MCMC Bayesian Inference in R [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking for a simple MCMC Bayesian network Inference function/package in R. Essentially, I just want a function that accepts the matrix containing my samples x my variables ( + optional parameters like burn-in and iteration counts) and returns the adjacency matrix of the inferred network.
I had been using the Matlab toolkit "BayesNet", which offers a simple 'learn_struct_mcmc' function which offers most of what I'm looking for. I'm looking for an equivalent in R.
I've been looking through the packages in http://cran.r-project.org/web/views/Bayesian.html, but haven't seen anything that quite does what I'm looking for. I wasn't trained as a statistician, and many of the packages I've looked at on that list either lack documentation or have more complicated statistics than I'm comfortable wiring together myself. I just need a simple function with "reasonable" defaults to get started.
Bonus points for something that leverages Rmpi or snow.
This gave me 132 possible relevant functions.
library(sos)
findFn("bayesian network")
How about this package.
http://cran.r-project.org/web/packages/MCMCpack/index.html
The closest thing to what I had in mind that I've found is the hc() function in the blearn package. They have a variety of other Bayesian network inference functions, as well, some of which can use snow.

Resources