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
Average step sizes as function of batch size
Efficiency at critical batch size
Efficiency at critical batch size
Estimate critical batch size from worst case analysis
Estimate critical batch size from worst case analysis
Eigenvalues of X2 vs X4
Eigenvalues of X2 vs X4
Main: Kaczmarz simulation for centered Gaussian
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
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[]=
Out[]=
W=E[x(x'xx']=E[yy']=
-1
)\),
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
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 for α=``",alpha],Filling->Axis];Show[plot2,plot1,PlotRange->{0,1}]Print[StringForm["=``",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 for α=``",alpha],Filling->Axis];Print[StringForm["=``",alpha,opMat//Rationalize[#,.01]&//MatrixForm]];Eigenvalues[opMat//Rationalize[#,.00001]&]Show[plot2,plot1,PlotRange->{0,1}]
T
α
T
``
T
α
T
``
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
Isotropic Kaczmarz in higher dimensions