File:Orthogonal Matching Pursuit.gif - Biblioteka.sk

Upozornenie: Prezeranie týchto stránok je určené len pre návštevníkov nad 18 rokov!
Zásady ochrany osobných údajov.
Používaním tohto webu súhlasíte s uchovávaním cookies, ktoré slúžia na poskytovanie služieb, nastavenie reklám a analýzu návštevnosti. OK, súhlasím


Panta Rhei Doprava Zadarmo
...
...


A | B | C | D | E | F | G | H | CH | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

File:Orthogonal Matching Pursuit.gif
 ...

Orthogonal_Matching_Pursuit.gif(576 × 189 pixelov, veľkosť súboru: 1 003 KB, MIME typ: image/gif, v cykle, 96 rámcov)

Tento zdieľaný súbor je z Wikimedia Commons a je možné ho používať na iných projektoch. Nižšie sú zobrazené informácie z popisnej stránky súboru.

Zhrnutie

Popis
English: Retrieving an unknown signal (gray line) from a small number of measurements (black dots) is in general impossible.

But if you know that the signal can be represented with only a few nonzero elements of a basis, then you can use "compressed sensing". By making the measurement in a basis that is incoherent with the basis the signal is sparse in, you ensure each measurement sample as many coefficients as possible. Here showing a "orthogonal-matching-pursuit" algorithm. The starting guess is that all coefficient are zero. At each iteration we add one coefficient that is nonzero, choosing the one that will effect our error metric the most.

The value of those few nonzero coefficients are then estimated by a least-square fitting, and the process is iterated until the error is smaller than a given threshold.
Dátum
Zdroj https://twitter.com/j_bertolotti/status/1214918749838594048
Autor Jacopo Bertolotti
Povolenie
(Využívanie tohto súboru)
https://twitter.com/j_bertolotti/status/1030470604418428929

Mathematica 11.0 code

(*Step 1: Generate the function to be retrieved and the "measurement matrix"*)
dim = 200; (*Number of points in the original data (input)*)
nm = 30; (*Number of measurements done*)
hf := (E^(-(x^2/2)) HermiteH)/Sqrt\Pi; (*Hermite polynomials*)
nb = 6; (*number of nonzero coefficients*)
nzc = Sort@RandomSampleRange40, nb (*non zero coefficients*)
c = RandomReal{-0.8, 0.8}, nb; (*coeffieicents*)
g = Sumcj hfnzcj, z, {j, 1, nb}; (*function we would like to retrieve (sparse in the Hermite polynomial basis by construction)*)
xideal = Normal@SparseArraynzc -> c, {dim}; (*ideal x vector we would like to retrieve*)
df = Tableg // N, {z, -7, 7, 14/(dim - 1)}; 
m = Sort@RandomSampleRangedim, nm; (*Points where we make the measurements (in the canonical basis)*)
Atmp = SparseArrayTable{j, mj}, {j, 1, nm} -> Table1, {j, 1, nm} , {nm, dim}; (*measurement matrix*)
\CapitalPhi = TableN@hfn, x, {n, 1, dim}, {x, -7, 7, 14/(dim - 1)};(*matrix of change of basis from Hermite to canonical (rows are the hermite polynomials)*)
A = Atmp.Transpose\CapitalPhi;
y = A.xideal;

(*Step 2: A working (but not optimized) implementation of the Orthogonal Matching Pursuit algorithm*)
(*initialization*)
\Epsilon0 = 10^-10; (*error threshold*)
x = Table0, {dim}; (*first guess for the coefficients is that they are all zero*)
r = y; (*so the residuals are identical to the measurements*)
nS = Rangedim; (*the complement of the support is everything*)

\Epsilon = TableNormAAll, j.r/NormAAll, j ^2 AAll, j - r^2, {j, 1, dim}nS; (*calculate the error for all columns of A that are not already in the support*)
j = Position\Epsilon, Min\Epsilon1, 1; (*select the one with the biggest impact on the error*)
\Epsilon = \Epsilonj; (*that one is the new error*)
nS = DropnS, {j}; (*update the complement of the support*)
S = DeleteCasesRangedim, Alternatives @@ nS; (*and thus update the support*)
AS = AAll, S; 
xS = InverseTransposeAS.AS.TransposeAS.y; (*find the best fit for the new estimate of x (least square fit)*)
r = y - A.x; (*update the residuals*)
tmp = x;

evo = ReapWhile\Epsilon > \Epsilon0, (*repeat until the error is small enough*)
      \Epsilon = TableNormAAll, j.r/NormAAll, j ^2 AAll, j - r^2, {j, 1, dim}nS;
      j = Position\Epsilon, Min\Epsilon1, 1;
      \Epsilon = \Epsilonj;
      nS = DropnS, {j};
      S = DeleteCasesRangedim, Alternatives @@ nS;
      AS = AAll, S; 
      xS = InverseTransposeAS.AS.TransposeAS.y;
      r = y - A.x;
      Sowx;
      ;2, 1;
evo = Prependevo, tmp;

(*Step 3: Generate the animation*)
p0 = TableGraphicsRow{
     Show
      ListPlotdf, Joined -> True, PlotStyle -> {Thick, Gray}, Axes -> False, PlotRange -> {-1, 1}, Epilog -> {PointSize0.02, Point({m, y} // Transpose)1 ;; k } 
     ,
     ListPlotTable0, {50}, PlotRange -> {{0, 50}, {-1, 1}}, Filling -> Axis, PlotStyle -> {Purple, PointSize0.02}, Axes -> False, Frame -> True, FrameLabel -> {"Element of the basis", "Coefficient"}, 
      LabelStyle -> {Bold, Black}
     }, ImageSize -> Large
   , {k, 1, nm};
p1 = Table
   GraphicsRow{
     Show
      ListPlotdf, Joined -> True, PlotStyle -> {Thick, Gray}, PlotRange -> {-1, 1}, ListPlot(1 - \Tau)*0 + \Tau Transpose\CapitalPhi.evo1, Joined -> True, PlotStyle -> {Thick, Orange}
      , Axes -> False, PlotRange -> {-1, 1}, Epilog -> {PointSize0.02, Point{m, y} // Transpose}
      
     ,
     ListPlot\Tau evo1, PlotRange -> {{0, 50}, {-1, 1}}, Filling -> Axis, PlotStyle -> {Purple, PointSize0.02}, Axes -> False, Frame -> True, FrameLabel -> {"Element of the basis", "Coefficient"}, 
      LabelStyle -> {Bold, Black}
     }, ImageSize -> Large
   , {\Tau, 0, 1, 0.1};
p2 = TableTable
    GraphicsRow{
      Show
       ListPlotdf, Joined -> True, PlotStyle -> {Thick, Gray}, PlotRange -> {-1, 1}, ListPlot(1 - \Tau)*Transpose\CapitalPhi.evok - 1 + \Tau Transpose\CapitalPhi.evok, 
        Joined -> True, PlotStyle -> {Thick, Orange}
       , Axes -> False, PlotRange -> {-1, 1}, Epilog -> {PointSize0.02, Point{m, y} // Transpose}
       
      ,
      ListPlot(1 - \Tau) evok - 1 + \Tau evok, PlotRange -> {{0, 50}, {-1, 1}}, Filling -> Axis, PlotStyle -> {Purple, PointSize0.02}, Axes -> False, Frame -> True, 
       FrameLabel -> {"Element of the basis", "Coefficient"}, LabelStyle -> {Bold, Black}
      }, ImageSize -> Large
    , {\Tau, 0, 1, 0.1}, {k, 2, DimensionsS1 - 1};
ListAnimateFlattenJoinp0, p1, p2

Licencovanie

Ja, držiteľ autorských práv k tomuto dielu ho týmto zverejňujem za podmienok nasledovnej licencie:
Creative Commons CC-Zero Tento súbor je sprístupnený za podmienok Creative Commons CC0 1.0 Universal Public Domain Dedication.
Osoba, ktorá spojila dielo s týmto vyhlásením uvoľnila toto dielo ako public domain (voľné dielo) tým, že sa s celosvetovou platnosťou vzdala všetkých svojich autorských práv, vrátane všetkých súvisiacich a susedných práv, do rozsahu, aký povoľuje zákon. Môžete kopírovať, upravovať, rozširovať i realizovať dielo, aj na komerčné využitie, to všetko bez potreby žiadať povolenie.

Štítky

Pridajte jednoriadkové vysvetlenie, čo tento súbor predstavuje
Retrival of a signal from a few data point using compressed sensing

Položky prezentované týmto súborom

motív

8. január 2020

image/gif

História súboru

Po kliknutí na dátum/čas uvidíte ako súbor vyzeral vtedy.

Dátum/ČasNáhľadRozmeryPoužívateľKomentár
aktuálna09:24, 9. január 2020Náhľad verzie z 09:24, 9. január 2020576 × 189 (1 003 KB)BertoUser created page with UploadWizard

Žiadne stránky neobsahujú odkazy na tento súbor.

Globálne využitie súborov

Nasledovné ďalšie wiki používajú tento súbor:

Metadáta

Zdroj:
Text je dostupný za podmienok Creative Commons Attribution/Share-Alike License 3.0 Unported; prípadne za ďalších podmienok. Podrobnejšie informácie nájdete na stránke Podmienky použitia.






Text je dostupný za podmienok Creative Commons Attribution/Share-Alike License 3.0 Unported; prípadne za ďalších podmienok.
Podrobnejšie informácie nájdete na stránke Podmienky použitia.

Your browser doesn’t support the object tag.

www.astronomia.sk | www.biologia.sk | www.botanika.sk | www.dejiny.sk | www.economy.sk | www.elektrotechnika.sk | www.estetika.sk | www.farmakologia.sk | www.filozofia.sk | Fyzika | www.futurologia.sk | www.genetika.sk | www.chemia.sk | www.lingvistika.sk | www.politologia.sk | www.psychologia.sk | www.sexuologia.sk | www.sociologia.sk | www.veda.sk I www.zoologia.sk