Most Popular

1500 questions
7
votes
0 answers

Choice between using Moore-Penrose inverse and G2 inverse

Moore-Penrose inverse for an arbitrary matrix $X\in \mathbb{R}^{n \times p}$ is defined by a matrix $X^\dagger$ satisfying all of the Moore-Penrose conditions, namely \begin{align} (1) \;\;\;& XX^\dagger X=X \\ (2) \;\;\;& X^\dagger X X^\dagger =…
waic
  • 173
  • 7
7
votes
0 answers

Can we sparse solve a few eigenvalues specified by index range?

I need to solve a few eigenvalues of a large sparse matrix specified by their index range. These indices are according to the whole eigenspectrum sorted in algebraic (not absolute value) ascending order. For example in python, I notice this is made…
xiaohuamao
  • 303
  • 1
  • 7
7
votes
1 answer

Eigen C++ Library Over 4x Slower than Fortran

I am experimenting with ways to call compiled programs from Python. My primary interest is iterative optimization methods, so I'm testing an implementation of Newton's method to solve a logistic regression problem. In my tests, a Fortran…
Robert Bassett
  • 486
  • 5
  • 12
7
votes
1 answer

Why is the central difference method dispersing my solution?

I am solving numerically the ODE $\ddot x(t)=-c\dot x(t) -\sin(x(t))+F\cdot \cos(\omega t), \;\dot x(0)=x(0)=0$ for $t\in [0,20\pi]$ on an $N=2000$ dimensional grid. I am working on Python, and I replaced the time derivatives by the finite…
7
votes
1 answer

Richardson extrapolation for strong rate of convergence of SDE

Is it possible to apply Richardson extrapolation with Euler-Maruyama scheme to improve strong rate of convergence of stochastic differential equations?
learningmath
  • 229
  • 1
  • 3
7
votes
3 answers

Does there exist an arbitrary-precision convex optimization solver?

I have a relatively simple convex optimization problem that involves less than 100 variables but contains a terribly ill-conditioned matrix. I have tried CVX and CPLEX; even though both can typically solve the problem in about 1 second, both fail…
David Ketcheson
  • 16,522
  • 4
  • 54
  • 105
7
votes
2 answers

Looking for C/C++ implementations of sampling from multinomial and Dirichlet distributions

I'm looking for C/C++ implementations of functions that return random variates multinomial and Dirichlet distributions. This is in the context of a calculation for posterior predictive p-values, part of which includes a MCMC step. I've been using…
Faheem Mitha
  • 731
  • 5
  • 14
7
votes
1 answer

continuous analogues of Newton's method

Suppose we want to minimize some convex functional $J(u)$ where $u$ lives in some Banach space $V$. The classical Newton method $$\mathrm d^2J(u_n)(u_{n + 1} - u_n) = -\mathrm dJ(u_n)$$ can be viewed as an explicit Euler discretization of the…
Daniel Shapero
  • 10,263
  • 1
  • 28
  • 59
7
votes
2 answers

Is it possible to dynamically resize a sparse matrix in the Petsc library?

This may be a Petsc newbie question, but... I'm using Petsc to solve a large sparse linear system. The initial creation of the matrix is fairly slow, which I'm given to understand is largely due to memory allocations; that's tolerable for the…
batty
  • 213
  • 1
  • 5
7
votes
1 answer

How does the number of function calls in BFGS scale with the dimensionality of space?

Question Is there any estimate for the scaling of the number of function calls in BFGS-optimization with the dimensionality of the search space? Specifically I am assuming a (free) expression for the gradient is supplied by the user so that no…
Kvothe
  • 183
  • 6
7
votes
2 answers

solving linear system whose symmetrized matrix is positive definite

Are there iterative methods for the solution of nonsymmetric linear systems $Ax=b$ that can take (theoretical or practical) advantage from knowing that $A+A^T$ is positive definite? These matrices are always nonsingular, but does this help the…
Arnold Neumaier
  • 11,318
  • 20
  • 47
7
votes
1 answer

Which finite difference better approximates $uu'$?

I want to approximate $uu'$ with a finite difference. On the one hand, it seems to be $$(uu')_i=u_i\frac{u_{i+1}-u_{i-1}}{2\Delta t}=\frac{u_iu_{i+1}-u_iu_{i-1}}{2\Delta t}$$ On the other…
7
votes
2 answers

Choice of iterative solver for a sparse asymmetric matrix with symmetric structure

I have a sparse $n\times n$ matrix $A$ with a pretty interesting structure. It has a block structure with a symmetric structure but asymmetric blocks. Expressed mathematically the block $A_{jk} = A_{kj}$ but $A_{jk} \neq A_{jk}^T$, so my matrix is…
EMP
  • 2,079
  • 10
  • 19
7
votes
2 answers

Piecewise polynomial interpolation: Hermite vs Lagrange

I am a bit confused of the qualitative behavior of the two methods. Consider quadratic case, start by having points $x_i$, where I know the value and points $y_j$, where the values to be found. If I want to do Lagrange interpolation at any point…
Kamil
  • 1,206
  • 11
  • 23
7
votes
1 answer

Cheap recalculation of eigenvalues and eigenvectors for a low-rank update of the matrix

Suppose I have a correlation matrix, $A$, and I already have the eigenvalues and eigenvectors of this matrix. For a given vector, $\mathbf{\mathit{v}}$, I want to calculate the eigenvalues and eigenvectors of the following new…
Max Wong
  • 189
  • 4