Xmipp
v3.23.11-Nereus
xmipp
libraries
classification
kSVD.h
Go to the documentation of this file.
1
/***************************************************************************
2
*
3
* Authors: Carlos Oscar S. Sorzano (coss@cnb.csic.es)
4
*
5
* Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
6
*
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20
* 02111-1307 USA
21
*
22
* All comments concerning this program package may be sent to the
23
* e-mail address 'xmipp@cnb.csic.es'
24
***************************************************************************/
25
26
#ifndef XMIPP__KSVD_HH__
27
#define XMIPP__KSVD_HH__
28
29
/* Includes ---------------------------------------------------------------- */
30
#include <
core/matrix2d.h
>
31
#include <
core/matrix1d.h
>
32
#include <vector>
33
37
48
double
orthogonalMatchingPursuit
(
const
Matrix1D<double>
&
x
,
49
const
Matrix2D<double>
&D,
int
S,
Matrix1D<double>
&alpha);
50
64
double
lasso
(
const
Matrix1D<double>
&
x
,
65
const
Matrix2D<double>
&D,
66
const
Matrix2D<double>
&DtD,
67
const
Matrix2D<double>
&DtDlambdaInv,
68
double
lambda
,
Matrix1D<double>
&alpha,
69
const
int
maxIter=20,
const
double
tol=0.005);
70
71
constexpr
int
OMP_PROJECTION
= 1;
72
constexpr
int
LASSO_PROJECTION
= 2;
73
74
75
#ifdef UNUSED // detected as unused 29.6.2018
76
86
double
kSVD(
const
std::vector<
Matrix1D<double>
> &X,
int
S,
87
Matrix2D<double>
&D, std::vector<
Matrix1D<double>
> &Alpha,
88
bool
keepFirstColumn=
true
,
int
maxIter=20,
double
minChange=0.005,
89
int
projectionMethod=
OMP_PROJECTION
,
double
lambda
=0.2);
91
#endif
92
93
#endif
x
doublereal * x
Definition:
numerical_recipes.cpp:2230
Matrix2D< double >
lambda
double * lambda
Definition:
numerical_recipes.cpp:4414
matrix1d.h
lasso
double lasso(const Matrix1D< double > &x, const Matrix2D< double > &D, const Matrix2D< double > &DtD, const Matrix2D< double > &DtDlambdaInv, double lambda, Matrix1D< double > &alpha, const int maxIter=20, const double tol=0.005)
Definition:
kSVD.cpp:149
matrix2d.h
orthogonalMatchingPursuit
double orthogonalMatchingPursuit(const Matrix1D< double > &x, const Matrix2D< double > &D, int S, Matrix1D< double > &alpha)
Definition:
kSVD.cpp:31
Matrix1D< double >
OMP_PROJECTION
constexpr int OMP_PROJECTION
Definition:
kSVD.h:71
LASSO_PROJECTION
constexpr int LASSO_PROJECTION
Definition:
kSVD.h:72
Generated by
1.8.13