WOLFRAM NOTEBOOK

In[]:=
deploy
Sun 28 Aug 2022 13:50:27
Simulations on Kaczmarz - like methods for Gaussian data

Average step sizes as function of batch size

Efficiency at critical batch size

Estimate critical batch size from worst case analysis

Eigenvalues of X2 vs X4

Main: Kaczmarz simulation for centered Gaussian

Global variables initialized by setupProblem:
d - number of dimensions
h - eigenvalues of covariance
sampler - f[b] returns (b,d) matrix of samples from distribution
pdf - density function
In[]:=
Quit
In[]:=
Out[]=
T
α
W
Out[]=
T
α
W
mean
W=E[x(x'x
-1
)\),
x']=E[yy']=
0.5
0.
0.
0.5
E[yy'yy']=
0.375
0.
0.
0.125
0.
0.125
0.125
0.
0.
0.125
0.125
0.
0.125
0.
0.
0.375
T
α
=
0.5
0.
0.
0.5
0.
-0.5
0.5
0.
0.
0.5
-0.5
0.
0.5
0.
0.
0.5

Three dimensions

setupProblem[3];computeExpectations;alpha=2;plot1=Plot[1,{x,1,Length[opMat]},PlotStyle->Directive[Dashed,Orange]];plot2=ListPlot[Eigenvalues[opMat],PlotLabel->StringForm["Eigenvalues of
T
α
for α=``",alpha],Filling->Axis];Show[plot2,plot1,PlotRange->{0,1}]Print[StringForm["
T
``
=``",alpha,opMat//Rationalize[#,.01]&//MatrixForm]];Eigenvalues[opMat//Rationalize[#,.00001]&]alpha=1;plot1=Plot[1,{x,1,Length[opMat]},PlotStyle->Directive[Dashed,Orange]];plot2=ListPlot[Eigenvalues[opMat],PlotLabel->StringForm["Eigenvalues of
T
α
for α=``",alpha],Filling->Axis];Print[StringForm["
T
``
=``",alpha,opMat//Rationalize[#,.01]&//MatrixForm]];Eigenvalues[opMat//Rationalize[#,.00001]&]Show[plot2,plot1,PlotRange->{0,1}]
Out[]=
\*SubscriptBox[\(T\),[{2}]\)\)]\)=\*TagBox[RowBox[{(, , GridBox[{{FractionBox[6, 13], 0, 0, 0, FractionBox[3, 11], 0, 0, 0, FractionBox[3, 11]}, {0, RowBox[{-, FractionBox[1, 14]}], 0, FractionBox[3, 11], 0, 0, 0, 0, 0}, {0, 0, RowBox[{-, FractionBox[1, 14]}], 0, 0, 0, FractionBox[3, 11], 0, 0}, {0, FractionBox[3, 11], 0, RowBox[{-, FractionBox[1, 14]}], 0, 0, 0, 0, 0}, {FractionBox[3, 11], 0, 0, 0, FractionBox[6, 13], 0, 0, 0, FractionBox[3, 11]}, {0, 0, 0, 0, 0, RowBox[{-, FractionBox[1, 14]}], 0, FractionBox[3, 11], 0}, {0, 0, FractionBox[3, 11], 0, 0, 0, RowBox[{-, FractionBox[1, 14]}], 0, 0}, {0, 0, 0, 0, 0, FractionBox[3, 11], 0, RowBox[{-, FractionBox[1, 14]}], 0}, {FractionBox[3, 11], 0, 0, 0, FractionBox[3, 11], 0, 0, 0, FractionBox[6, 13]}}, Rule[RowSpacings, 1], Rule[ColumnSpacings, 1], Rule[RowAlignments, Baseline], Rule[ColumnAlignments, Center]], , )}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]\)
Out[]=
1,-
1
3
,-
1
3
,-
1
3
,
1
5
,
1
5
,
1
5
,
1
5
,
1
5
\*SubscriptBox[\(T\),[{1}]\)\)]\)=\*TagBox[RowBox[{(, , GridBox[{{FractionBox[7, 13], 0, 0, 0, FractionBox[1, 15], 0, 0, 0, FractionBox[1, 15]}, {0, FractionBox[2, 5], 0, FractionBox[1, 15], 0, 0, 0, 0, 0}, {0, 0, FractionBox[2, 5], 0, 0, 0, FractionBox[1, 15], 0, 0}, {0, FractionBox[1, 15], 0, FractionBox[2, 5], 0, 0, 0, 0, 0}, {FractionBox[1, 15], 0, 0, 0, FractionBox[7, 13], 0, 0, 0, FractionBox[1, 15]}, {0, 0, 0, 0, 0, FractionBox[2, 5], 0, FractionBox[1, 15], 0}, {0, 0, FractionBox[1, 15], 0, 0, 0, FractionBox[2, 5], 0, 0}, {0, 0, 0, 0, 0, FractionBox[1, 15], 0, FractionBox[2, 5], 0}, {FractionBox[1, 15], 0, 0, 0, FractionBox[1, 15], 0, 0, 0, FractionBox[7, 13]}}, Rule[RowSpacings, 1], Rule[ColumnSpacings, 1], Rule[RowAlignments, Baseline], Rule[ColumnAlignments, Center]], , )}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]\)
Out[]=
2
3
,
7
15
,
7
15
,
7
15
,
7
15
,
7
15
,
1
3
,
1
3
,
1
3
Out[]=

Isotropic Kaczmarz in higher dimensions

Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.