I am Charmie

メモとログ

Optimization

Polynomial fitting by linear least squares

I made a repository of C++ code that runs polynomial fitting by linear least squares.

Maple: for deriving objective function and jacobian function

We can generate C code of an objective function by using Maple as with(linalg); F := ...; Ffunc := unapply(convert(convert(F, vector), list), PARAMETERS); CodeGeneration[C](Ffunc, optimize); I tried the following equation $latex \frac{p_0}…

Levenberg Marquardt algorithm in C++

For start-up projects, I need a non-linear optimization C++ library, especially Levenberg Marquardt algorithm. I found two candidates: levmar and Eigen::LevenbergMarquardt. In terms of examples, levmar provides good examples homest while E…

function dlevmar_der() of levmar

int dlevmar_der( void (func)(double p, double x, int m, int n, void adata), void (jacf)(double p, double j, int m, int n, void adata), double p, double x, int m, int n, int itmax, double opts[4], double info[LM_INFO_SZ], double work, doubl…

levmar 2.6 with Visual Studio 2010

memo for compiling levmar 2.6 on windows with visual studio 2010. we need to modify the code a bit for compilation!!! .lib files CmakeLists.txt of levmar 2.6 assumes that you put all lapack related .lib files into one directory. In Cmake G…

Using levmar 2.6 with Visual Studio

On my previous post, I posted how to compile levmar 2.5 with visual studio 2010. Since the procedure mentioned there is not enough to compile levmar 2.6, I write how to solve the compilation issue even though the chips is written on levmar…

BV norm

BV norm is $latex l{1}$-norm of the gradient of its argument as $latex \Vert u \Vert{BV} = \Vert \nabla u \Vert_{1}$

levmar with Visual Studio 2010

levmarのコンパイルには2つのステップが必要: LAPACKのインストールとlevmarのコンパイル.LAPACKではなくCLAPACKを使ってlevmarを使ってみる(LAPACKを自前でセットアップするにはfortranのコンパイラやら何やらが必要みたいだけど,調べてて頭が痛くなって…

Using levmar with Visual Studio 2010

levmar compilation requires two steps: LAPACK installation and levmar compilation. Here, I use CLAPACK instead of LAPACK for ease of setup but any types of CLAPACK might be fine. CLAPACK installation There are several options to build CLAP…

Basis Pursuit and Matching Pursuit

Suppose we observe a signal $latex x$. With a dictionary $latex D$, the signal $latex x$ is represented by a linear equation as $latex x = D\alpha$. Given the observed signal, our goal is to find the coefficients $latex \alpha$. Assuming $…

GPSR

Sparse solutionのsolverとGPSR(Gradient Projection for Sparse Reconstruction)を試す.一部のデモファイルを動かすにはRice wavelet toolboxが必要なので,以下からzipファイル(rwtwinxp.zip)をダウンロード.http://dsp.rice.edu/software/rice-wavelet-…

GPSR

GPSR(Gradient Projection for Sparse Reconstruction)のセットアップMatLabでコンパイルする環境作成>> mex -setup質問通りに素直に進む.Rice Wavelet ToolboxのインストールFilesから適当なファイルをダウンロード.適当な場所でコンパイル.>> compileGP…