Most Popular
1500 questions
8
votes
2 answers
What is a good way to understand the overall structure of a code base?
Sometimes it is useful in my work to modify someone else open-source code or find out how to develop specific things for your own application. However, not all software have good documentation.
What is a good way to understand the overall structure…
Allan P. Engsig-Karup
- 3,226
- 19
- 31
8
votes
3 answers
Scientific Programming on Mac using Objective-C/Cocoa for MATLAB Users
I want to get started on scientific programming on the Mac using Objective-C. I am very familiar with MATLAB which makes it easy to store complex-valued waveform data in vectors and generating plots. I was wondering if there might be a good…
Mike
- 181
- 2
8
votes
3 answers
What is the criteria for switching between Strassen's and Regular matrix multiplication Algorithms
Strassen’s Matrix Multiplication algorithm has theoretical performance of $ O( n^{log_2 7}) $. Regular MM algorithm has performance of $ O( n^{3}) $.
At certain sizes of matrices (lets call it $n*n$), Regular MM works better. However, once size…
newprint
- 231
- 2
- 3
8
votes
0 answers
Stable alternatives to "condition number"?
A number of numerical problems are easy to solve when condition number $\kappa$ of the problem is low. For instance, conjugate gradient descent complexity scales as $O(\sqrt{\kappa})$.
However
"condition number" is numerically unstable, becoming…
Yaroslav Bulatov
- 2,655
- 11
- 23
8
votes
2 answers
Energy conservation in RK4 integration scheme in C++
My colleague and I are trying to study the three-body problem, with different integration schemes, starting from the two-body problem. We implemented the symplectic Euler scheme and the Runge–Kutta 4th order in C++, and the trajectories obtained are…
jack23456
- 171
- 7
8
votes
1 answer
Accurate computation of logbinomial(x,y)
I need to compute the logarithm of the binomial coefficient,
$$\log\binom{x}{y} = -\log\mathrm{B}(y + 1, x - y + 1) - \log(x + 1)$$
accurately, where $\mathrm{B}(x,y)$ is the Beta function.
I'm aware of packages computing $\log\mathrm{B}(x,y)$…
a06e
- 1,729
- 15
- 22
8
votes
1 answer
How does each process in bag of visual words image classification work?
I hope this is on topic, I found this through the proposal here:
https://area51.meta.stackexchange.com/questions/320/shall-we-unite-computational-science-proposals
A good visual description of BOW:
I don't quite understand the point of some of the…
mugetsu
- 183
- 1
- 5
8
votes
2 answers
Are Quasi-Newton methods computationally impractical?
I was reading a book by Simon Haykin on neural networks when I came across the following strong statement (on the pdf's page 188):
"However, we still have a computational complexity that is
$\mathcal{O}(W^2)$, where $W$ is the size of weight vector…
Rubem Pacelli
- 205
- 1
- 5
8
votes
2 answers
Are stiffness and instability equivalent?
To the best of my knowledge, stiffness of ordinary differential equations is difficult to capture but can be roughly described as problems where explicit methods don't work while implicit ones do. Alternatively, the stiffness ratio of the Jacobian…
Marten
- 231
- 1
- 4
8
votes
0 answers
How do we approximate the numerical error a numerical scheme (e.g Runge Kutta, Euler etc) makes without having access to an analytical solution?
So I recently encountered this question in my head while taking my Scientific Computing class, where the lecturer talked about computing numerical error of a scheme.
My guess would be that we take a much higher order scheme and treat its solution…
KARTIK BALI
- 101
- 4
8
votes
2 answers
Approximating the boundary between two sets of points (in 2D): Fitting a region
Given two sets of points $p_{\text{in},i}$ and $p_{\text{out},j}$ inside and outside of what I intuitively call a "region", I would like to estimate and describe the boundary of this region. Two kinds of answer are welcome:
A parametrized…
Lichtkarussell
- 81
- 4
8
votes
3 answers
Reverse-engineering a quadratic fit?
The square root function for an old (pre-IEEE floating point, no hidden bit) mainframe (the Soviet BESM-6 works as follows:
Making sure the argument $X$ is non-negative
Splitting $X$ into the exponent $E$ and the 40-bit mantissa $M$, the latter…
Leo B.
- 215
- 2
- 9
8
votes
1 answer
Why Is This Python Code Faster Than Fortran Wrapper with F2PY?
I am writing a proof-of-concept implementation of Newton's method for minimizing the negative log-likelihood term in a logistic regression model. I'm comparing the performance of a native python implementation and a fortran implementation where I…
Robert Bassett
- 486
- 5
- 12
8
votes
0 answers
Is there a graphical interpretation or explanation of automatic differentiation compared to numerical differentiation
I have been looking at automatic differentiation for solving differential equations lately. I understand the basic ideas of using Dual numbers and such for finding derivatives, etc. However, I feel like I am not understanding the geometric…
krishnab
- 297
- 1
- 7
8
votes
2 answers
Why are log and exp considered 'expensive' computations in ML?
In many resources/videos I see comments being made along the lines of "and we can see here that we have a logarithm/exponential so this will be an expensive computation to make." (such as with the sigmoid activation function for a NN). What is…
DChaps
- 183
- 1
- 4