Compare commits

...

15 Commits

Author SHA1 Message Date
Daniel Kapla 7a68948d26 effie 2024-04-11 16:08:00 +02:00
Daniel Kapla 8fd80522f0 effie changes (abstract / intro) 2024-03-28 14:19:24 +01:00
Daniel Kapla 0cb7772132 sync 2024-03-28 14:17:40 +01:00
Daniel Kapla db9c3f4794 start cleanup after writing thesis 2024-03-19 13:30:44 +01:00
Daniel Kapla 636eebf720 add: TSIR returns intenrnal variables as attr,
fix: numeric stable loss cals also for loss initialization
2024-01-10 17:31:52 +01:00
Daniel Kapla daefd3e7d1 changed PSQTs,
fix: typo in data_gen.cpp inverting quiete position sampling,
add: white and black to move support,
update: eeg data example,
add: position analytics as interace to the schachhoernchen Board class
2024-01-10 17:28:55 +01:00
Daniel Kapla 61bd94bec8 add: eeg.R and psqt.tex 2023-12-30 10:06:41 +01:00
Daniel Kapla 13d3c63575 fix: gmlm_tensor_normal loss calc changed to numerically more stable version,
add: matrix rownames, colnames support to matrixImage
2023-12-30 10:04:35 +01:00
Daniel Kapla fa2a99f3f0 "finishd" chess example,
changed fen2tensor to show the Vienna Game,
add: chess example to paper.tex
2023-12-30 10:01:12 +01:00
Daniel Kapla 85b6a2a12a wip: gmlm chess sim 2023-12-19 14:13:49 +01:00
Daniel Kapla 078c406100 fix: gmlm_chess bug (save point saved "last_loss = Inf"),
replaced self implemented SIR in sim-tsir with "do.sir" from Rdimtools,
add: fen2tensor image (TikZ),
add: section chess data example in paper.tex
2023-12-13 18:46:17 +01:00
Daniel Kapla 6792cf93a9 add: chess data example with Rchess 2023-12-11 14:29:51 +01:00
Daniel Kapla 4b4b30ceb0 add: LaTeX images/* and plots/* with aggregated sim data 2023-12-11 13:35:26 +01:00
Daniel Kapla 2e87d14696 added Ising sims 2023-12-11 13:25:45 +01:00
Daniel Kapla 4324295162 changed isimg_m2() to use the LogSumExp trick to compute the log_prob_0 instead of prob_0,
and som other stuff
2023-12-11 13:23:29 +01:00
83 changed files with 12814 additions and 855 deletions

18
.gitignore vendored
View File

@ -43,10 +43,11 @@
*.idb
*.pdb
## R environment, data and pacakge build intermediate files/folders
## R environment, data and package build intermediate files/folders
# R Data Object files
*.Rds
*.rds
*.Rdata
# Example code in package build process
*-Ex.R
@ -108,20 +109,23 @@ simulations/
!**/LaTeX/*.bib
**/LaTeX/*-blx.bib
mlda_analysis/
References/
dataAnalysis/chess/*.Rdata
dataAnalysis/Classification of EEG/
*.csv
*.csv.log
# Include subfolders for images and plots
!**/LaTeX/plots/
**/LaTeX/plots/*
!**/LaTeX/plots/*.tex
!**/LaTeX/plots/*.csv
!**/LaTeX/images/
**/LaTeX/images/*
!**/LaTeX/images/*.tex
mlda_analysis/
References/
dataAnalysis/
*.csv
*.csv.log
# Images (except images used in LaTeX)
*.png
*.svg

View File

@ -0,0 +1,125 @@
\documentclass{standalone}
\usepackage{pgfplots} % TikZ (TeX ist kein Zeichenprogramm)
\usetikzlibrary{calc} % for vector arithmetics
\usepackage{amssymb, bm}
\renewcommand{\t}[1]{{#1}^{T}}
\newcommand{\mat}[1]{\boldsymbol{#1}}
\newcommand{\manifold}[1]{\mathfrak{#1}}
% PGF-Plot / TikZ config
\usetikzlibrary{%
calc, through, intersections, patterns, patterns.meta, pgfplots.colormaps
}
\pgfplotsset{
compat = newest,
colormap = {grayscale}{color=(lightgray) color=(white) color=(lightgray)},
colormap = {blackscale}{color=(black!70) color=(black!50) color=(black!70)},
colormap = {redscale}{color=(black!70!red) color=(black!50!red) color=(black!70!red)},
colormap = {bluescale}{color=(black!70!blue) color=(black!50!blue) color=(black!70!blue)},
}
\begin{document}
\begin{tikzpicture}[
>=latex,
scale = 1,
declare function = { % Note: NO spaces in function argument list!
X(\u,\v) = (2 + cos(\u)) * cos(\v);
Y(\u,\v) = (2 + cos(\u)) * sin(\v);
Z(\u,\v) = sin(\u);
tx(\u,\v,\x,\y) = - sin(\u) * cos(\u) * \x - (2 + cos(\u)) * sin(\v) * \y;
ty(\u,\v,\x,\y) = - sin(\u) * cos(\u) * \x + (2 + cos(\u)) * cos(\v) * \y;
tz(\u,\v,\x,\y) = + cos(\u) * \x;
}
]
\begin{axis}[
axis equal image,
hide axis,
view = {120}{30},
scale = 2
]
\addplot3[
surf,
shader = faceted interp,
samples = 20,
samples y = 40,
domain = 0:360,
domain y = 0:360,
z buffer = sort,
colormap name = grayscale,
thin
]
({X(\x, \y)}, {Y(\x, \y)}, {Z(\x, \y)});
% at = (1.433013, 2.482051, 0.5) // \u, \v = (30, 60)
% into = (-0.4330127, -0.4330127, 0.8660254)
% and = (-2.482051, 1.433013, 0)
% X <- c(1.433013, 2.482051, 0.5)
% dx <- c(-0.4330127, -0.4330127, 0.8660254)
% dy <- c(-2.482051, 1.433013, 0)
\addplot3[
mesh,
shader = interp,
patch type = line,
variable = t,
domain = -44:210.5,
samples = 64,
samples y = 1,
colormap name = redscale
]
({X(\t, \t + 30)}, {Y(\t, \t + 30)}, {Z(\t, \t + 30)});
\addplot3[
mesh,
shader = interp,
patch type = line,
variable = t,
domain = -50:119,
samples = 64,
samples y = 1,
colormap name = bluescale
]
({X(\t, -0.3 * \t + 69)}, {Y(\t, -0.3 * \t + 69)}, {Z(\t, -0.3 * \t + 69)});
\coordinate (x) at ({X(30, 60)}, {Y(30, 60)}, {Z(30, 60)});
\draw[dashed, fill = gray, opacity = 0.4] (
{X(30, 60) + tx(30, 60, 0.4 + 0.8, 0.4 - 0.24)},
{Y(30, 60) + ty(30, 60, 0.4 + 0.8, 0.4 - 0.24)},
{Z(30, 60) + tz(30, 60, 0.4 + 0.8, 0.4 - 0.24)}
) -- (
{X(30, 60) + tx(30, 60, -0.4 + 0.8, -0.4 - 0.24)},
{Y(30, 60) + ty(30, 60, -0.4 + 0.8, -0.4 - 0.24)},
{Z(30, 60) + tz(30, 60, -0.4 + 0.8, -0.4 - 0.24)}
) node[anchor = west, opacity = 1, outer sep=0.5em] {$T_{\mat{x}}\manifold{A}$} -- (
{X(30, 60) + tx(30, 60, -0.4 - 0.8, -0.4 + 0.24)},
{Y(30, 60) + ty(30, 60, -0.4 - 0.8, -0.4 + 0.24)},
{Z(30, 60) + tz(30, 60, -0.4 - 0.8, -0.4 + 0.24)}
) -- (
{X(30, 60) + tx(30, 60, 0.4 - 0.8, 0.4 + 0.24)},
{Y(30, 60) + ty(30, 60, 0.4 - 0.8, 0.4 + 0.24)},
{Z(30, 60) + tz(30, 60, 0.4 - 0.8, 0.4 + 0.24)}
) -- cycle;
\draw[->, black!50!red] (x) -- (
{X(30, 60) + tx(30, 60, 0.4, 0.4)},
{Y(30, 60) + ty(30, 60, 0.4, 0.4)},
{Z(30, 60) + tz(30, 60, 0.4, 0.4)}
) node[pos = 0.7, anchor = north west, inner sep = 0pt] {$\t{\nabla\gamma_1(0)}$};
\draw[->, black!50!blue] (x) -- (
{X(30, 60) + tx(30, 60, 0.8, -0.24)}, % -0.24 = 0.8 * -0.3
{Y(30, 60) + ty(30, 60, 0.8, -0.24)},
{Z(30, 60) + tz(30, 60, 0.8, -0.24)}
) node[pos = 0.7, anchor = south west, inner sep = 0pt] {$\t{\nabla\gamma_2(0)}$};
\node[anchor = north] at (x) {$\mat{x}$};
\node[circle, inner sep={1pt}, outer sep={0pt}, fill=black] at (x) {};
\end{axis}
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,118 @@
\documentclass{standalone}
\usepackage{pgfplots} % TikZ (TeX ist kein Zeichenprogramm)
\usetikzlibrary{calc, perspective, pgfplots.colormaps} % PGF-Plot / TikZ config
\pgfplotsset{
compat = newest,
colormap = {grayscale}{color=(lightgray) color=(white) color=(lightgray)},
colormap = {blackscale}{color=(black!70) color=(black!50) color=(black!70)},
}
% Define the (component) embedding into the torus
\tikzset{declare function = { % Note: NO spaces in function argument list!
Z(\u,\v) = 0.4 * \u * \u * cos(\v * 120);
bx(\t) = -0.5 + 0.3 * cos(\t) + 0.05 * sin(3 * \t);
by(\t) = 0.2 + 0.3 * sin(\t);
}}
% Further packages and macros
\usepackage{amssymb, bm}
\renewcommand{\t}[1]{{#1}^{T}}
\newcommand{\mat}[1]{\boldsymbol{#1}}
\newcommand{\manifold}[1]{\mathfrak{#1}}
\begin{document}
\begin{tikzpicture}[>=latex]
\begin{axis}[
axis equal image,
hide axis,
view = {120}{30},
scale = 1,
clip = false
]
\coordinate (O) at (0, 0, 0);
\draw[->] (-0.1, 0, 0) -- (0.6, 0, 0) node[pos = 1.1] {};
\draw[->] (0, -0.1, 0) -- (0, 1.2, 0) node[pos = 1.1] {};
\draw[->] (0, 0, -0.1) -- (0, 0, 1.0) node[pos = 1.1] {};
\addplot3[
surf,
shader = faceted interp,
samples = 16,
samples y = 16,
domain = -1:0.4,
domain y = -0.5:1,
z buffer = sort,
colormap name = grayscale,
thin
]
({\x}, {\y}, {Z(\x, \y)});
\addplot3[
samples = 64,
samples y = 0,
domain = 0:360,
color = black!40!gray,
fill = black,
fill opacity = 0.1,
colormap name = blackscale,
thick
]
({bx(\x)}, {by(\x)}, {Z(bx(\x), by(\x))});
\coordinate (coordU) at ({bx(150)}, {by(150)}, {Z(bx(150), by(150))});
\node[anchor = south west] (U) at (coordU) {$U$};
\node[
circle, fill=black, inner sep=0.75pt, label={$\mat{\theta}_0$}
] (theta0) at (-0.5, 0.2, {Z(-0.5, 0.2)}) {};
\node at (0, 0.5, 1.2) {$\Theta\subseteq\mathbb{R}^p$};
\node (UU) at ({bx(0)}, {by(0)}, {Z(bx(0), by(0))}) {};
\end{axis}
\begin{scope}[shift = {(11cm, 2cm)}, scale = 2.5]
\coordinate (O) at (-1.1, -0.3);
\draw[step=0.1, lightgray!80, thin] (O) grid +(1.2, 1.2);
\draw[->] ($(O) - (0.05, 0)$) -- +(1.4, 0) node[pos=1.1] {};
\draw[->] ($(O) - (0, 0.05)$) -- +(0, 1.4) node[pos=1.1] {};
\draw[domain=0:360, smooth, variable=\x, fill=black, fill opacity = 0.1, thick] plot ({bx(\x)}, {by(\x)});
\node[
circle, fill=black, inner sep=0.75pt, label={$\mat{s}_0$}
] (s0) at (-0.5, 0.2) {};
\coordinate (coordPhiU) at ({bx(90)}, {by(90)});
\node[anchor = south east, outer sep = 0pt] (phiU) at (coordPhiU) {$\varphi(U)$};
\node at (-0.5, 1.28) {$\varphi(U)\subseteq\mathbb{R}^d$};
\node (phiUU) at ({bx(270)}, {by(270)}) {};
\end{scope}
\draw[->, out = 20, in = 160] (U.north east) to node[above, pos = 0.5] {$\varphi$} (phiU.north west);
\draw[->, out = 200, in = 340] (phiU.south west) to node[above, pos = 0.5] {$\varphi^{-1}$} (U.south east);
\node (R) at (6.1, 0) {$\mathbb{R}$};
\draw[->, out = 270, in = 180] (UU) to node[below left, pos = 0.6] {$M$} (R);
\draw[->, out = 270, in = 0] (phiUU) to node[below right, pos = 0.4] {$M_{\varphi}$} (R);
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,78 @@
\documentclass{standalone}
\usepackage[LSB, T1]{fontenc}
\usepackage{chessboard}
\usepackage{skak}
\usepackage{tikz, tikz-3dplot}
\usepackage{amsmath}
\usepackage{xcolor}
\newcommand{\z}{{\color{gray}0}}
\tdplotsetmaincoords{80}{135}
\setboardfontencoding{LSB}
\setchessboard{linewidth = 0.1em, showmover = false, smallboard}
\newcommand{\chessplane}[2]{
\begin{scope}[canvas is yz plane at x={-#1 * 0.8}, transform shape]
\node[fill = white, opacity = 0.7, outer sep=0pt, inner sep=2pt] (layer#1) at (0, 0) {
\chessboard[
margin=false,
pgfstyle=text,
text=\textbf{1},
markfields={#2},
label=false
]
};
\end{scope}
}
\begin{document}
\begin{tikzpicture}
\begin{scope}[tdplot_main_coords, scale = 1]
\chessplane{12}{e8};
\chessplane{11}{d8};
\chessplane{10}{a8, h8};
\chessplane{9}{c8, f8};
\chessplane{8}{b8, g8};
\chessplane{7}{a7, b7, c7, d7, e5, f7, g7, h7};
\chessplane{6}{e1};
\chessplane{5}{d1};
\chessplane{4}{a1, h1};
\chessplane{3}{c1, f1};
\chessplane{2}{c3, g1};
\chessplane{1}{a2, b2, c2, d2, e4, f2, g2, h2};
\begin{scope}[canvas is yz plane at x={-1}, transform shape]
\node[anchor = south, rotate = 90] at (layer1.west) {Ranks / Axis 1};
\node[anchor = north] at (layer1.south) {Files / Axis 2};
\end{scope}
\coordinate (offset) at (layer1.west);
\newdimen\xoffset
\pgfextractx{\xoffset}{\pgfpointanchor{offset}{center}}
\begin{scope}[canvas is xz plane at y=\xoffset, transform shape, xscale=-1]
\path (layer1.north west) -- (layer12.north west) node[
pos = 0.5, anchor = south
] {Pieces / Mixture Components};
\end{scope}
\end{scope}
\coordinate (tensor north) at (current bounding box.north);
\node[shift = {(0, 0)}, anchor = east] (pos) at (current bounding box.west) {{
\setchessboard{linewidth = 0.1em, showmover = false, smallboard}
\newgame
% The Vienna Game
\hidemoves{1. e4 e5 2.Nc3} % Like `\mainline` but does NOT show the PGN line
\chessboard{}
}};
\node[anchor = south] at (pos.center |- tensor north) {Position};
\node[anchor = south] at (tensor north) {Encoding};
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,36 @@
\begin{tikzpicture}[scale = \tikzscale], line width = 1pt]
\def\rect#1#2#3{
\draw (0, 0, 0) -- (#1, 0, 0) -- (#1, #2, 0) -- (0, #2, 0) -- cycle;
\draw[ ] (#1, 0, -#3) -- (#1, #2, -#3) -- (0, #2, -#3);
\draw[dashed] (#1, 0, -#3) -- (0, 0, -#3) -- (0, #2, -#3);
\draw[dashed] (0, 0, 0) -- (0, 0, -#3);
\draw[ ] (0, #2, 0) -- (0, #2, -#3);
\draw[ ] (#1, 0, 0) -- (#1, 0, -#3);
\draw[ ] (#1, #2, 0) -- (#1, #2, -#3);
}
\begin{scope}[yshift = 1cm, line width = 1pt]
\rect{1.5}{1}{2}
\node[font = \boldmath] at (1, 0.5) {$\ten{R}(\ten{X})$};
\end{scope}
\rect{3}{2}{4}
\node at (2, 0.5) {$\ten{X} - \E\ten{X}$};
\draw[lightgray, line width = 0.7pt] (-2.1, 2) arc (180:270:2);
\draw[fill = lightgray, fill opacity = 0.7] (-2.1, 1) rectangle +(2, 1)
node [pos = 0.5] {$\t{\mat{\beta}_1}$};
\draw[lightgray, line width = 0.7pt, domain = 0:1, smooth, variable = \t]
plot ({0}, {2.1 + 4 * cos(90 * \t)}, {-4 * sin(90 * \t)});
\draw[fill = lightgray, fill opacity = 0.7]
(0, 2.1, 0) -- (0, 2.1, -2) -- (0, 6.1, -2) -- (0, 6.1, 0) -- cycle;
\node[opacity = 0.7, cm={0.66, 0.66, 0, 1, (0, 0)}]
at (0, 4.1, -1.1) {$\t{\mat{\beta}_3}$};
\draw[lightgray, line width = 0.7pt] (0, 5.1) arc (90:0:3);
\draw[fill = lightgray, fill opacity = 0.7] (0, 2.1) rectangle +(1.5, 3)
node [pos = 0.5] {$\t{\mat{\beta}_2}$};
\end{tikzpicture}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
sample.size rep time.gmlm dist.subspace.gmlm dist.projection.gmlm time.pca dist.subspace.pca dist.projection.pca time.hopca dist.subspace.hopca dist.projection.hopca time.tsir dist.subspace.tsir dist.projection.tsir time.mgcca dist.subspace.mgcca dist.projection.mgcca
100 50.5 0.03385 0.2433541701 0.2433541701 0.00226 0.863261257 0.863261257 0.00132 0.961234054 0.961234054 0.01148 0.27002415 0.27002415 0.02002 0.726356935 0.726356935
200 50.5 0.05152 0.1649899379 0.1649899379 0.00217 0.852767026 0.852767026 0.00266 0.960479878 0.960479878 0.01373 0.1884941138 0.1884941138 0.01991 0.713602535 0.713602535
300 50.5 0.06495 0.1336658703 0.1336658703 0.00486 0.843714531 0.843714531 0.01064 0.958630831 0.958630831 0.01328 0.1526304709 0.1526304709 0.02 0.71557788 0.71557788
500 50.5 0.13549 0.1032317816 0.1032317816 0.00938 0.846591187 0.846591187 0.01447 0.959566069 0.959566069 0.01722 0.1208618464 0.1208618464 0.05966 0.713613799 0.713613799
750 50.5 0.19323 0.0920445927 0.0920445927 0.00751 0.843049644 0.843049644 0.02065 0.95998194 0.95998194 0.02132 0.1040318623 0.1040318623 0.06884 0.708925464 0.708925464
1 sample.size rep time.gmlm dist.subspace.gmlm dist.projection.gmlm time.pca dist.subspace.pca dist.projection.pca time.hopca dist.subspace.hopca dist.projection.hopca time.tsir dist.subspace.tsir dist.projection.tsir time.mgcca dist.subspace.mgcca dist.projection.mgcca
2 100 50.5 0.03385 0.2433541701 0.2433541701 0.00226 0.863261257 0.863261257 0.00132 0.961234054 0.961234054 0.01148 0.27002415 0.27002415 0.02002 0.726356935 0.726356935
3 200 50.5 0.05152 0.1649899379 0.1649899379 0.00217 0.852767026 0.852767026 0.00266 0.960479878 0.960479878 0.01373 0.1884941138 0.1884941138 0.01991 0.713602535 0.713602535
4 300 50.5 0.06495 0.1336658703 0.1336658703 0.00486 0.843714531 0.843714531 0.01064 0.958630831 0.958630831 0.01328 0.1526304709 0.1526304709 0.02 0.71557788 0.71557788
5 500 50.5 0.13549 0.1032317816 0.1032317816 0.00938 0.846591187 0.846591187 0.01447 0.959566069 0.959566069 0.01722 0.1208618464 0.1208618464 0.05966 0.713613799 0.713613799
6 750 50.5 0.19323 0.0920445927 0.0920445927 0.00751 0.843049644 0.843049644 0.02065 0.95998194 0.95998194 0.02132 0.1040318623 0.1040318623 0.06884 0.708925464 0.708925464

View File

@ -0,0 +1,6 @@
sample.size rep time.gmlm dist.subspace.gmlm dist.projection.gmlm time.pca dist.subspace.pca dist.projection.pca time.hopca dist.subspace.hopca dist.projection.hopca time.tsir dist.subspace.tsir dist.projection.tsir time.mgcca dist.subspace.mgcca dist.projection.mgcca
100 50.5 0.14271 0.1354623792 0.1798569269 0.0025 0.805020847 0.999758145 0.00145 0.761295768 0.954043725 0.0099 0.1994699895 0.265283655 0.56208 0.770351142 0.999521275
200 50.5 0.31697 0.091214259 0.1210839439 0.00241 0.802922368 0.999879665 0.00257 0.730120539 0.925368399 0.0111 0.1483718847 0.1994800746 0.59856 0.758579776 0.999522252
300 50.5 0.39396 0.0726682553 0.0971497767 0.00586 0.806481505 0.999904273 0.00971 0.749474609 0.94434003 0.01265 0.1159595746 0.1577793427 0.56191 0.761351696 0.999435422
500 50.5 0.83078 0.0580925082 0.0779289812 0.00612 0.80574294 0.999944057 0.01732 0.751571927 0.947305126 0.01541 0.0917985004 0.12450158 2.16411 0.755277454 0.999081992
750 50.5 1.34147 0.0461519857 0.0610860564 0.00908 0.805450073 0.999961492 0.02064 0.749556315 0.945706618 0.02024 0.0797286457 0.1077928847 2.6289 0.750454219 0.999378091
1 sample.size rep time.gmlm dist.subspace.gmlm dist.projection.gmlm time.pca dist.subspace.pca dist.projection.pca time.hopca dist.subspace.hopca dist.projection.hopca time.tsir dist.subspace.tsir dist.projection.tsir time.mgcca dist.subspace.mgcca dist.projection.mgcca
2 100 50.5 0.14271 0.1354623792 0.1798569269 0.0025 0.805020847 0.999758145 0.00145 0.761295768 0.954043725 0.0099 0.1994699895 0.265283655 0.56208 0.770351142 0.999521275
3 200 50.5 0.31697 0.091214259 0.1210839439 0.00241 0.802922368 0.999879665 0.00257 0.730120539 0.925368399 0.0111 0.1483718847 0.1994800746 0.59856 0.758579776 0.999522252
4 300 50.5 0.39396 0.0726682553 0.0971497767 0.00586 0.806481505 0.999904273 0.00971 0.749474609 0.94434003 0.01265 0.1159595746 0.1577793427 0.56191 0.761351696 0.999435422
5 500 50.5 0.83078 0.0580925082 0.0779289812 0.00612 0.80574294 0.999944057 0.01732 0.751571927 0.947305126 0.01541 0.0917985004 0.12450158 2.16411 0.755277454 0.999081992
6 750 50.5 1.34147 0.0461519857 0.0610860564 0.00908 0.805450073 0.999961492 0.02064 0.749556315 0.945706618 0.02024 0.0797286457 0.1077928847 2.6289 0.750454219 0.999378091

View File

@ -0,0 +1,6 @@
sample.size rep time.gmlm dist.subspace.gmlm time.pca dist.subspace.pca time.hopca dist.subspace.hopca time.tsir dist.subspace.tsir time.mgcca dist.subspace.mgcca
100 50.5 0.53037 0.225507724 0.00225 0.268624529 0.0012 0.268631852 0.00927 0.975552785 0.01707 0.268634801
200 50.5 0.92916 0.1462304967 0.00229 0.268618192 0.00247 0.268627434 0.01055 0.969086651 0.0149 0.268616289
300 50.5 1.28251 0.118119137 0.00404 0.268672296 0.01078 0.268679546 0.01247 0.937344184 0.0181 0.268678444
500 50.5 2.50673 0.0925056109 0.00548 0.268620612 0.01687 0.268627137 0.01547 0.920788974 0.04591 0.268609548
750 50.5 3.78846 0.0734930824 0.00654 0.268629405 0.02286 0.26863585 0.0202 0.895542158 0.05844 0.268624504
1 sample.size rep time.gmlm dist.subspace.gmlm time.pca dist.subspace.pca time.hopca dist.subspace.hopca time.tsir dist.subspace.tsir time.mgcca dist.subspace.mgcca
2 100 50.5 0.53037 0.225507724 0.00225 0.268624529 0.0012 0.268631852 0.00927 0.975552785 0.01707 0.268634801
3 200 50.5 0.92916 0.1462304967 0.00229 0.268618192 0.00247 0.268627434 0.01055 0.969086651 0.0149 0.268616289
4 300 50.5 1.28251 0.118119137 0.00404 0.268672296 0.01078 0.268679546 0.01247 0.937344184 0.0181 0.268678444
5 500 50.5 2.50673 0.0925056109 0.00548 0.268620612 0.01687 0.268627137 0.01547 0.920788974 0.04591 0.268609548
6 750 50.5 3.78846 0.0734930824 0.00654 0.268629405 0.02286 0.26863585 0.0202 0.895542158 0.05844 0.268624504

View File

@ -0,0 +1,6 @@
sample.size rep time.gmlm dist.subspace.gmlm dist.projection.gmlm time.pca dist.subspace.pca dist.projection.pca time.hopca dist.subspace.hopca dist.projection.hopca time.tsir dist.subspace.tsir dist.projection.tsir time.mgcca dist.subspace.mgcca dist.projection.mgcca
100 50.3838383838384 0.19140404040404 0.159429996868687 0.217885249393939 0.00227272727272727 0.81991723030303 0.999889914141414 0.00136363636363636 0.7542142 0.956573433333333 0.00942424242424242 0.312921257070707 0.425537564949495 0.260232323232323 0.763839525252525 0.998650488888889
200 50.5 0.29272 0.1106441325 0.1502575874 0.00215 0.817273094 0.999952668 0.00267 0.756428697 0.961631268 0.01125 0.2406254633 0.3291691439 0.25668 0.752812085 0.997789874
300 50.5 0.40969 0.0942165171 0.1284457744 0.00577 0.817365328 0.99997193 0.00976 0.755867381 0.962490478 0.01219 0.2079868565 0.287219385 0.25407 0.744109244 0.997966974
500 50.5 0.80715 0.0671783369 0.092410679 0.00584 0.815885787 0.99998542 0.01576 0.745753387 0.955364336 0.01536 0.1719722289 0.2389028516 0.99684 0.74347681 0.998687779
750 50.5 1.30069 0.0560128971 0.077140984 0.00736 0.817057557 0.999983813 0.02158 0.745917278 0.955524558 0.01902 0.1544664904 0.2144889183 1.26885 0.742632193 0.998826916
1 sample.size rep time.gmlm dist.subspace.gmlm dist.projection.gmlm time.pca dist.subspace.pca dist.projection.pca time.hopca dist.subspace.hopca dist.projection.hopca time.tsir dist.subspace.tsir dist.projection.tsir time.mgcca dist.subspace.mgcca dist.projection.mgcca
2 100 50.3838383838384 0.19140404040404 0.159429996868687 0.217885249393939 0.00227272727272727 0.81991723030303 0.999889914141414 0.00136363636363636 0.7542142 0.956573433333333 0.00942424242424242 0.312921257070707 0.425537564949495 0.260232323232323 0.763839525252525 0.998650488888889
3 200 50.5 0.29272 0.1106441325 0.1502575874 0.00215 0.817273094 0.999952668 0.00267 0.756428697 0.961631268 0.01125 0.2406254633 0.3291691439 0.25668 0.752812085 0.997789874
4 300 50.5 0.40969 0.0942165171 0.1284457744 0.00577 0.817365328 0.99997193 0.00976 0.755867381 0.962490478 0.01219 0.2079868565 0.287219385 0.25407 0.744109244 0.997966974
5 500 50.5 0.80715 0.0671783369 0.092410679 0.00584 0.815885787 0.99998542 0.01576 0.745753387 0.955364336 0.01536 0.1719722289 0.2389028516 0.99684 0.74347681 0.998687779
6 750 50.5 1.30069 0.0560128971 0.077140984 0.00736 0.817057557 0.999983813 0.02158 0.745917278 0.955524558 0.01902 0.1544664904 0.2144889183 1.26885 0.742632193 0.998826916

View File

@ -0,0 +1,6 @@
sample.size rep time.gmlm dist.subspace.gmlm dist.projection.gmlm time.pca dist.subspace.pca dist.projection.pca time.hopca dist.subspace.hopca dist.projection.hopca time.tsir dist.subspace.tsir dist.projection.tsir time.mgcca dist.subspace.mgcca dist.projection.mgcca
100 50.5 0.02532 0.736796092 1 0.00209 0.900231255 0.999317475 0.00057 0.844797856 1 0.01269 0.768475572 1 0.03429 0.801702356 0.996195093
200 50.5 0.02118 0.723026339 1 0.00202 0.897808634 0.999511768 0.00076 0.821791902 1 0.01143 0.729274976 1 0.03156 0.754417729 0.993998159
300 50.5 0.02073 0.719268149 1 0.00253 0.896381124 0.999790203 0.00086 0.810580445 1 0.0108 0.723298879 1 0.03314 0.730024383 0.994609905
500 50.5 0.06797 0.714404844 1 0.00556 0.894836313 0.999794819 0.00472 0.806682723 1 0.01003 0.719358531 1 0.08743 0.70385003 0.990669984
750 50.5 0.08089 0.712524515 1 0.00652 0.894548046 0.999845024 0.00646 0.800351207 1 0.011 0.716469876 1 0.10204 0.687227594 0.991626558
1 sample.size rep time.gmlm dist.subspace.gmlm dist.projection.gmlm time.pca dist.subspace.pca dist.projection.pca time.hopca dist.subspace.hopca dist.projection.hopca time.tsir dist.subspace.tsir dist.projection.tsir time.mgcca dist.subspace.mgcca dist.projection.mgcca
2 100 50.5 0.02532 0.736796092 1 0.00209 0.900231255 0.999317475 0.00057 0.844797856 1 0.01269 0.768475572 1 0.03429 0.801702356 0.996195093
3 200 50.5 0.02118 0.723026339 1 0.00202 0.897808634 0.999511768 0.00076 0.821791902 1 0.01143 0.729274976 1 0.03156 0.754417729 0.993998159
4 300 50.5 0.02073 0.719268149 1 0.00253 0.896381124 0.999790203 0.00086 0.810580445 1 0.0108 0.723298879 1 0.03314 0.730024383 0.994609905
5 500 50.5 0.06797 0.714404844 1 0.00556 0.894836313 0.999794819 0.00472 0.806682723 1 0.01003 0.719358531 1 0.08743 0.70385003 0.990669984
6 750 50.5 0.08089 0.712524515 1 0.00652 0.894548046 0.999845024 0.00646 0.800351207 1 0.011 0.716469876 1 0.10204 0.687227594 0.991626558

View File

@ -0,0 +1,6 @@
sample.size rep time.gmlm dist.subspace.gmlm time.tnormal dist.subspace.tnormal time.pca dist.subspace.pca time.hopca dist.subspace.hopca time.lpca dist.subspace.lpca time.clpca dist.subspace.clpca time.tsir dist.subspace.tsir time.mgcca dist.subspace.mgcca
100 50.5 3.45133 0.337616233 -1 0.3481195602 0.00072 0.895240418 0.00078 0.895726045 0.03836 0.940902054 0.01723 0.905975108 0.01174 0.4840146138 0.01181 0.552492798
200 50.5 3.53892 0.2469025607 -1 0.258109693 0.00072 0.899078549 0.00073 0.898430313 0.0454 0.96077596 0.0172 0.909073167 0.01033 0.3767345117 0.00636 0.529634143
300 50.5 3.32198 0.1973335545 -1 0.2202339413 7e-04 0.894730117 0.00099 0.89457278 0.04582 0.96650364 0.01672 0.906092011 0.01085 0.2945936124 0.00647 0.506940794
500 50.5 3.47776 0.1560136925 -1 0.178495357 0.00081 0.897138615 0.00142 0.896433003 0.05409 0.982097991 0.01885 0.907027647 0.01102 0.2348182831 0.00751 0.504727342
750 50.5 3.63432 0.1338283596 -1 0.1501165074 0.00091 0.896805421 0.00194 0.896259394 0.06547 0.98164125 0.0208 0.906989078 0.01159 0.2264630936 0.00888 0.525239052
1 sample.size rep time.gmlm dist.subspace.gmlm time.tnormal dist.subspace.tnormal time.pca dist.subspace.pca time.hopca dist.subspace.hopca time.lpca dist.subspace.lpca time.clpca dist.subspace.clpca time.tsir dist.subspace.tsir time.mgcca dist.subspace.mgcca
2 100 50.5 3.45133 0.337616233 -1 0.3481195602 0.00072 0.895240418 0.00078 0.895726045 0.03836 0.940902054 0.01723 0.905975108 0.01174 0.4840146138 0.01181 0.552492798
3 200 50.5 3.53892 0.2469025607 -1 0.258109693 0.00072 0.899078549 0.00073 0.898430313 0.0454 0.96077596 0.0172 0.909073167 0.01033 0.3767345117 0.00636 0.529634143
4 300 50.5 3.32198 0.1973335545 -1 0.2202339413 7e-04 0.894730117 0.00099 0.89457278 0.04582 0.96650364 0.01672 0.906092011 0.01085 0.2945936124 0.00647 0.506940794
5 500 50.5 3.47776 0.1560136925 -1 0.178495357 0.00081 0.897138615 0.00142 0.896433003 0.05409 0.982097991 0.01885 0.907027647 0.01102 0.2348182831 0.00751 0.504727342
6 750 50.5 3.63432 0.1338283596 -1 0.1501165074 0.00091 0.896805421 0.00194 0.896259394 0.06547 0.98164125 0.0208 0.906989078 0.01159 0.2264630936 0.00888 0.525239052

View File

@ -0,0 +1,6 @@
sample.size rep time.gmlm dist.subspace.gmlm dist.projection.gmlm time.tnormal dist.subspace.tnormal dist.projection.tnormal time.pca dist.subspace.pca dist.projection.pca time.hopca dist.subspace.hopca dist.projection.hopca time.lpca dist.subspace.lpca dist.projection.lpca time.clpca dist.subspace.clpca dist.projection.clpca time.tsir dist.subspace.tsir dist.projection.tsir time.mgcca dist.subspace.mgcca dist.projection.mgcca
100 50.5 2.61295 0.3403757357 0.3403757357 -1 0.3479059356 0.3479059356 6e-04 0.825472384 0.985301393 0.00064 0.898420853 0.898420853 0.03221 0.819788638 0.984818682 0.08248 0.830116397 0.985435015 0.00525 0.5383179747 0.5383179747 0.03822 0.684322002 0.87142619
200 50.5 2.69877 0.2336318211 0.2336318211 -1 0.2242954626 0.2242954626 0.00062 0.805871266 0.986137373 0.00083 0.894115576 0.894115576 0.04415 0.805329005 0.98705536 0.09073 0.813651382 0.988806844 0.00584 0.3463104772 0.3463104772 0.03612 0.607852417 0.779137501
300 50.5 2.84797 0.17056658598 0.17056658598 -1 0.177746684 0.177746684 0.00065 0.809654889 0.993082221 0.00099 0.901032982 0.901032982 0.05754 0.809330963 0.994445446 0.09848 0.817965106 0.995003702 0.00587 0.23915106584 0.23915106584 0.03905 0.564592137 0.722673845
500 50.5 2.99338 0.1421103262 0.1421103262 -1 0.14097689578 0.14097689578 8e-04 0.801989292 0.996579785 0.00143 0.911579678 0.911579678 0.06962 0.804787754 0.997525521 0.11444 0.814022873 0.99807076 0.00645 0.1904496139 0.1904496139 0.04446 0.506345649 0.646893436
750 50.5 3.13791 0.1099093089 0.1099093089 -1 0.11200510849 0.11200510849 0.00085 0.803412662 0.997339272 0.0018 0.90974563 0.90974563 0.06278 0.805842802 0.998157979 0.12508 0.816324572 0.998309878 0.00736 0.14247728474 0.14247728474 0.04683 0.488465089 0.623423991
1 sample.size rep time.gmlm dist.subspace.gmlm dist.projection.gmlm time.tnormal dist.subspace.tnormal dist.projection.tnormal time.pca dist.subspace.pca dist.projection.pca time.hopca dist.subspace.hopca dist.projection.hopca time.lpca dist.subspace.lpca dist.projection.lpca time.clpca dist.subspace.clpca dist.projection.clpca time.tsir dist.subspace.tsir dist.projection.tsir time.mgcca dist.subspace.mgcca dist.projection.mgcca
2 100 50.5 2.61295 0.3403757357 0.3403757357 -1 0.3479059356 0.3479059356 6e-04 0.825472384 0.985301393 0.00064 0.898420853 0.898420853 0.03221 0.819788638 0.984818682 0.08248 0.830116397 0.985435015 0.00525 0.5383179747 0.5383179747 0.03822 0.684322002 0.87142619
3 200 50.5 2.69877 0.2336318211 0.2336318211 -1 0.2242954626 0.2242954626 0.00062 0.805871266 0.986137373 0.00083 0.894115576 0.894115576 0.04415 0.805329005 0.98705536 0.09073 0.813651382 0.988806844 0.00584 0.3463104772 0.3463104772 0.03612 0.607852417 0.779137501
4 300 50.5 2.84797 0.17056658598 0.17056658598 -1 0.177746684 0.177746684 0.00065 0.809654889 0.993082221 0.00099 0.901032982 0.901032982 0.05754 0.809330963 0.994445446 0.09848 0.817965106 0.995003702 0.00587 0.23915106584 0.23915106584 0.03905 0.564592137 0.722673845
5 500 50.5 2.99338 0.1421103262 0.1421103262 -1 0.14097689578 0.14097689578 8e-04 0.801989292 0.996579785 0.00143 0.911579678 0.911579678 0.06962 0.804787754 0.997525521 0.11444 0.814022873 0.99807076 0.00645 0.1904496139 0.1904496139 0.04446 0.506345649 0.646893436
6 750 50.5 3.13791 0.1099093089 0.1099093089 -1 0.11200510849 0.11200510849 0.00085 0.803412662 0.997339272 0.0018 0.90974563 0.90974563 0.06278 0.805842802 0.998157979 0.12508 0.816324572 0.998309878 0.00736 0.14247728474 0.14247728474 0.04683 0.488465089 0.623423991

View File

@ -0,0 +1,6 @@
sample.size rep time.gmlm dist.subspace.gmlm time.tnormal dist.subspace.tnormal time.pca dist.subspace.pca time.hopca dist.subspace.hopca time.lpca dist.subspace.lpca time.clpca dist.subspace.clpca time.tsir dist.subspace.tsir time.mgcca dist.subspace.mgcca
100 50.5 3.09356 0.3156118185 -1 0.333911302 0.00073 0.878676674 0.00075 0.896222186 0.09113 0.806536411 0.04383 0.896834118 0.01101 0.497285466 0.01193 0.575079476
200 50.5 3.12299 0.2077510819 -1 0.2436035005 0.00066 0.874724783 0.00079 0.889384878 0.09807 0.733886862 0.04732 0.894434769 0.01046 0.324664115 0.00669 0.576863144
300 50.5 3.16421 0.1861360687 -1 0.2008576102 0.00078 0.870909384 0.00102 0.886922724 0.11782 0.7481989 0.0503 0.893348533 0.01119 0.2976653034 0.00771 0.585351528
500 50.5 3.2918 0.1462556459 -1 0.1719980649 0.00085 0.874809929 0.00141 0.888039936 0.16421 0.725505512 0.06 0.894785099 0.01279 0.2572542268 0.00873 0.585034361
750 50.5 3.34843 0.1180667497 -1 0.1269961448 0.00084 0.87183362 0.00184 0.888721897 0.22709 0.667001863 0.07148 0.891578538 0.01242 0.2446346482 0.00958 0.589975817
1 sample.size rep time.gmlm dist.subspace.gmlm time.tnormal dist.subspace.tnormal time.pca dist.subspace.pca time.hopca dist.subspace.hopca time.lpca dist.subspace.lpca time.clpca dist.subspace.clpca time.tsir dist.subspace.tsir time.mgcca dist.subspace.mgcca
2 100 50.5 3.09356 0.3156118185 -1 0.333911302 0.00073 0.878676674 0.00075 0.896222186 0.09113 0.806536411 0.04383 0.896834118 0.01101 0.497285466 0.01193 0.575079476
3 200 50.5 3.12299 0.2077510819 -1 0.2436035005 0.00066 0.874724783 0.00079 0.889384878 0.09807 0.733886862 0.04732 0.894434769 0.01046 0.324664115 0.00669 0.576863144
4 300 50.5 3.16421 0.1861360687 -1 0.2008576102 0.00078 0.870909384 0.00102 0.886922724 0.11782 0.7481989 0.0503 0.893348533 0.01119 0.2976653034 0.00771 0.585351528
5 500 50.5 3.2918 0.1462556459 -1 0.1719980649 0.00085 0.874809929 0.00141 0.888039936 0.16421 0.725505512 0.06 0.894785099 0.01279 0.2572542268 0.00873 0.585034361
6 750 50.5 3.34843 0.1180667497 -1 0.1269961448 0.00084 0.87183362 0.00184 0.888721897 0.22709 0.667001863 0.07148 0.891578538 0.01242 0.2446346482 0.00958 0.589975817

View File

@ -0,0 +1,6 @@
sample.size rep time.gmlm dist.subspace.gmlm dist.projection.gmlm time.tnormal dist.subspace.tnormal dist.projection.tnormal time.pca dist.subspace.pca dist.projection.pca time.hopca dist.subspace.hopca dist.projection.hopca time.lpca dist.subspace.lpca dist.projection.lpca time.clpca dist.subspace.clpca dist.projection.clpca time.tsir dist.subspace.tsir dist.projection.tsir time.mgcca dist.subspace.mgcca dist.projection.mgcca
100 50.5 3.03076 0.3036349361 0.3036349361 -1 0.2868643362 0.2868643362 0.00073 0.818177689 0.984435713 0.00063 0.755946643 0.755946643 0.05648 0.819181741 0.953681387 0.0867 0.822312566 0.986781953 0.00613 0.4019671947 0.4019671947 0.04573 0.588313518 0.75377487
200 50.5 3.10805 0.1992945381 0.1992945381 -1 0.2020230182 0.2020230182 0.00074 0.814338816 0.987890451 0.00093 0.690811228 0.690811228 0.05801 0.81457008 0.961377759 0.08991 0.825394861 0.991647771 0.00599 0.2511707246 0.2511707246 0.04656 0.476761868 0.629632653
300 50.5 3.3052 0.1546113425 0.1546113425 -1 0.1537117318 0.1537117318 0.00075 0.798497064 0.993693989 0.00099 0.729634976 0.729634976 0.05696 0.820224046 0.982252313 0.09375 0.806834524 0.992228985 0.00636 0.1790215654 0.1790215654 0.04835 0.37049092 0.4917621054
500 50.5 3.88258 0.1130383355 0.1130383355 -1 0.11118393534 0.11118393534 0.00095 0.817445534 0.996960022 0.00148 0.651972301 0.651972301 0.07627 0.816560225 0.989645322 0.11561 0.837453121 0.996154736 0.00715 0.1217933129 0.1217933129 0.06199 0.2348135641 0.3010364601
750 50.5 3.97107 0.09585699718 0.09585699718 -1 0.09463671116 0.09463671116 0.00106 0.829576522 0.996509465 0.00179 0.6203066621 0.6203066621 0.09122 0.820908322 0.988956119 0.13158 0.849250091 0.997066922 0.00765 0.10393120662 0.10393120662 0.06512 0.1950222554 0.2482127769
1 sample.size rep time.gmlm dist.subspace.gmlm dist.projection.gmlm time.tnormal dist.subspace.tnormal dist.projection.tnormal time.pca dist.subspace.pca dist.projection.pca time.hopca dist.subspace.hopca dist.projection.hopca time.lpca dist.subspace.lpca dist.projection.lpca time.clpca dist.subspace.clpca dist.projection.clpca time.tsir dist.subspace.tsir dist.projection.tsir time.mgcca dist.subspace.mgcca dist.projection.mgcca
2 100 50.5 3.03076 0.3036349361 0.3036349361 -1 0.2868643362 0.2868643362 0.00073 0.818177689 0.984435713 0.00063 0.755946643 0.755946643 0.05648 0.819181741 0.953681387 0.0867 0.822312566 0.986781953 0.00613 0.4019671947 0.4019671947 0.04573 0.588313518 0.75377487
3 200 50.5 3.10805 0.1992945381 0.1992945381 -1 0.2020230182 0.2020230182 0.00074 0.814338816 0.987890451 0.00093 0.690811228 0.690811228 0.05801 0.81457008 0.961377759 0.08991 0.825394861 0.991647771 0.00599 0.2511707246 0.2511707246 0.04656 0.476761868 0.629632653
4 300 50.5 3.3052 0.1546113425 0.1546113425 -1 0.1537117318 0.1537117318 0.00075 0.798497064 0.993693989 0.00099 0.729634976 0.729634976 0.05696 0.820224046 0.982252313 0.09375 0.806834524 0.992228985 0.00636 0.1790215654 0.1790215654 0.04835 0.37049092 0.4917621054
5 500 50.5 3.88258 0.1130383355 0.1130383355 -1 0.11118393534 0.11118393534 0.00095 0.817445534 0.996960022 0.00148 0.651972301 0.651972301 0.07627 0.816560225 0.989645322 0.11561 0.837453121 0.996154736 0.00715 0.1217933129 0.1217933129 0.06199 0.2348135641 0.3010364601
6 750 50.5 3.97107 0.09585699718 0.09585699718 -1 0.09463671116 0.09463671116 0.00106 0.829576522 0.996509465 0.00179 0.6203066621 0.6203066621 0.09122 0.820908322 0.988956119 0.13158 0.849250091 0.997066922 0.00765 0.10393120662 0.10393120662 0.06512 0.1950222554 0.2482127769

View File

@ -0,0 +1,36 @@
dim exact MC MCthrd
1 73.5012 2479.1000 5306.4984
2 59.9796 8664.1598 9779.8466
3 64.5056 12914.5464 16183.0764
4 53.2328 16508.2854 17870.7350
5 96.9536 24127.6058 21767.8086
6 63.4716 28597.2378 26124.3540
7 72.9282 40515.4708 29894.6794
8 104.7062 50231.4678 38400.2156
9 92.1626 63120.4664 43210.9808
10 137.0708 78229.7892 45129.4508
11 199.2572 90637.2042 52743.8126
12 416.4218 110416.5194 53946.7448
13 1300.8774 113405.5306 62789.0696
14 1613.6268 147592.3898 65697.4700
15 4308.1456 150118.8002 77611.7774
16 6218.6118 169137.1948 79600.3404
17 19130.1692 193395.2364 84645.9674
18 35013.7520 191694.0282 89612.3666
19 79783.0592 219430.7520 89025.0298
20 164029.9676 221552.7670 97877.6912
21 344260.9886 NaN NaN
22 727962.7158 NaN NaN
23 1575072.6418 NaN NaN
24 3408482.1812 NaN NaN
30 NaN 432889.7808 159195.6658
40 NaN 675539.2932 227844.4468
50 NaN 921443.9964 322103.8008
60 NaN 1249191.1684 365132.1606
70 NaN 1634723.4776 463334.2788
80 NaN 2020644.9422 517770.1918
90 NaN 2341498.2072 608483.0752
100 NaN 2912498.1526 720652.3034
110 NaN 3485288.1716 872467.7020
120 NaN 4134359.9114 985625.2118
130 NaN 4619163.4688 1064965.6310
1 dim exact MC MCthrd
2 1 73.5012 2479.1000 5306.4984
3 2 59.9796 8664.1598 9779.8466
4 3 64.5056 12914.5464 16183.0764
5 4 53.2328 16508.2854 17870.7350
6 5 96.9536 24127.6058 21767.8086
7 6 63.4716 28597.2378 26124.3540
8 7 72.9282 40515.4708 29894.6794
9 8 104.7062 50231.4678 38400.2156
10 9 92.1626 63120.4664 43210.9808
11 10 137.0708 78229.7892 45129.4508
12 11 199.2572 90637.2042 52743.8126
13 12 416.4218 110416.5194 53946.7448
14 13 1300.8774 113405.5306 62789.0696
15 14 1613.6268 147592.3898 65697.4700
16 15 4308.1456 150118.8002 77611.7774
17 16 6218.6118 169137.1948 79600.3404
18 17 19130.1692 193395.2364 84645.9674
19 18 35013.7520 191694.0282 89612.3666
20 19 79783.0592 219430.7520 89025.0298
21 20 164029.9676 221552.7670 97877.6912
22 21 344260.9886 NaN NaN
23 22 727962.7158 NaN NaN
24 23 1575072.6418 NaN NaN
25 24 3408482.1812 NaN NaN
26 30 NaN 432889.7808 159195.6658
27 40 NaN 675539.2932 227844.4468
28 50 NaN 921443.9964 322103.8008
29 60 NaN 1249191.1684 365132.1606
30 70 NaN 1634723.4776 463334.2788
31 80 NaN 2020644.9422 517770.1918
32 90 NaN 2341498.2072 608483.0752
33 100 NaN 2912498.1526 720652.3034
34 110 NaN 3485288.1716 872467.7020
35 120 NaN 4134359.9114 985625.2118
36 130 NaN 4619163.4688 1064965.6310

55
LaTeX/plots/aggr-tsir.csv Normal file
View File

@ -0,0 +1,55 @@
rho order beta.version dist.subspace.gmlm dist.subspace.tsir dist.subspace.sir
0 2 1 0.05561496033 0.05061728586 0.0937440796
0.1 2 1 0.05695142139 0.0470966691 0.0926586359
0.2 2 1 0.06091107141 0.05239605337 0.0908641089
0.3 2 1 0.06307756487 0.05222743771 0.1017065255
0.4 2 1 0.0660642872 0.06165316957 0.101956927
0.5 2 1 0.0607144752 0.06296036226 0.1132399708
0.6 2 1 0.0680270013 0.07738945736 0.1338582214
0.7 2 1 0.08308930348 0.1022448411 0.1719732064
0.8 2 1 0.09393400477 0.1391586209 0.26938282
0 3 1 0.0417583747 0.04632848929 0.2461782677
0.1 3 1 0.0434276533 0.05218873186 0.2213153802
0.2 3 1 0.04597206968 0.0570669677 0.249537892
0.3 3 1 0.04502304399 0.0614214213 0.27102197
0.4 3 1 0.0473382351 0.0792024647 0.319204514
0.5 3 1 0.0566416444 0.1123603747 0.402911276
0.6 3 1 0.0635449054 0.1726250727 0.514738707
0.7 3 1 0.0790087287 0.3119839854 0.696578663
0.8 3 1 0.1049010818 0.625019551 0.901082248
0 4 1 0.0318544676 0.0756838662 0.763664746
0.1 4 1 0.0291616189 0.0732198203 0.724917238
0.2 4 1 0.0339593815 0.0892676958 0.727812142
0.3 4 1 0.033896654 0.1217472737 0.802679627
0.4 4 1 0.0421267215 0.1792376247 0.875051648
0.5 4 1 0.0497214363 0.2948337295 0.920789642
0.6 4 1 0.0649548512 0.516274211 0.961926272
0.7 4 1 0.0796107149 0.82163525 0.969975565
0.8 4 1 0.1319282631 0.952178592 0.969918026
0 2 2 0.04419882713 0.05007045448 0.0981350583
0.1 2 2 0.04771625635 0.06317718403 0.0994558305
0.2 2 2 0.05842513124 0.07257500657 0.1393608074
0.3 2 2 0.06074603789 0.0937379307 0.1469685419
0.4 2 2 0.06804359146 0.13265083527 0.1811307013
0.5 2 2 0.08431280029 0.15490492217 0.2644350099
0.6 2 2 0.0972256132 0.2322527248 0.3252648145
0.7 2 2 0.11758589026 0.3462559988 0.493115596
0.8 2 2 0.17756305 0.5735205103 0.688565503
0 3 2 0.03463284148 0.0894755449 0.413328838
0.1 3 2 0.04180307759 0.1390793707 0.497959545
0.2 3 2 0.0460221535 0.2086373171 0.63903354
0.3 3 2 0.0537508593 0.3124281256 0.748414045
0.4 3 2 0.060618005 0.495823454 0.890088075
0.5 3 2 0.0853542084 0.6712004401 0.956569545
0.6 3 2 0.0910737894 0.853848871 0.985803877
0.7 3 2 0.1435666309 0.965105066 0.995326644
0.8 3 2 0.1842180974 0.993108512 0.996942006
0 4 2 0.03189456039 0.260763794 0.958145847
0.1 4 2 0.03256901682 0.413864983 0.981053177
0.2 4 2 0.03944012707 0.635137383 0.99257835
0.3 4 2 0.0491580489 0.87045687 0.99829348
0.4 4 2 0.0633184796 0.961679634 0.999828802
0.5 4 2 0.0785727515 0.996049666 0.999905562
0.6 4 2 0.118468394 0.99986322 0.999134535
0.7 4 2 0.1952382107 0.999994091 0.9319280744
0.8 4 2 0.055013371 0.999999997 0.87224130919
1 rho order beta.version dist.subspace.gmlm dist.subspace.tsir dist.subspace.sir
2 0 2 1 0.05561496033 0.05061728586 0.0937440796
3 0.1 2 1 0.05695142139 0.0470966691 0.0926586359
4 0.2 2 1 0.06091107141 0.05239605337 0.0908641089
5 0.3 2 1 0.06307756487 0.05222743771 0.1017065255
6 0.4 2 1 0.0660642872 0.06165316957 0.101956927
7 0.5 2 1 0.0607144752 0.06296036226 0.1132399708
8 0.6 2 1 0.0680270013 0.07738945736 0.1338582214
9 0.7 2 1 0.08308930348 0.1022448411 0.1719732064
10 0.8 2 1 0.09393400477 0.1391586209 0.26938282
11 0 3 1 0.0417583747 0.04632848929 0.2461782677
12 0.1 3 1 0.0434276533 0.05218873186 0.2213153802
13 0.2 3 1 0.04597206968 0.0570669677 0.249537892
14 0.3 3 1 0.04502304399 0.0614214213 0.27102197
15 0.4 3 1 0.0473382351 0.0792024647 0.319204514
16 0.5 3 1 0.0566416444 0.1123603747 0.402911276
17 0.6 3 1 0.0635449054 0.1726250727 0.514738707
18 0.7 3 1 0.0790087287 0.3119839854 0.696578663
19 0.8 3 1 0.1049010818 0.625019551 0.901082248
20 0 4 1 0.0318544676 0.0756838662 0.763664746
21 0.1 4 1 0.0291616189 0.0732198203 0.724917238
22 0.2 4 1 0.0339593815 0.0892676958 0.727812142
23 0.3 4 1 0.033896654 0.1217472737 0.802679627
24 0.4 4 1 0.0421267215 0.1792376247 0.875051648
25 0.5 4 1 0.0497214363 0.2948337295 0.920789642
26 0.6 4 1 0.0649548512 0.516274211 0.961926272
27 0.7 4 1 0.0796107149 0.82163525 0.969975565
28 0.8 4 1 0.1319282631 0.952178592 0.969918026
29 0 2 2 0.04419882713 0.05007045448 0.0981350583
30 0.1 2 2 0.04771625635 0.06317718403 0.0994558305
31 0.2 2 2 0.05842513124 0.07257500657 0.1393608074
32 0.3 2 2 0.06074603789 0.0937379307 0.1469685419
33 0.4 2 2 0.06804359146 0.13265083527 0.1811307013
34 0.5 2 2 0.08431280029 0.15490492217 0.2644350099
35 0.6 2 2 0.0972256132 0.2322527248 0.3252648145
36 0.7 2 2 0.11758589026 0.3462559988 0.493115596
37 0.8 2 2 0.17756305 0.5735205103 0.688565503
38 0 3 2 0.03463284148 0.0894755449 0.413328838
39 0.1 3 2 0.04180307759 0.1390793707 0.497959545
40 0.2 3 2 0.0460221535 0.2086373171 0.63903354
41 0.3 3 2 0.0537508593 0.3124281256 0.748414045
42 0.4 3 2 0.060618005 0.495823454 0.890088075
43 0.5 3 2 0.0853542084 0.6712004401 0.956569545
44 0.6 3 2 0.0910737894 0.853848871 0.985803877
45 0.7 3 2 0.1435666309 0.965105066 0.995326644
46 0.8 3 2 0.1842180974 0.993108512 0.996942006
47 0 4 2 0.03189456039 0.260763794 0.958145847
48 0.1 4 2 0.03256901682 0.413864983 0.981053177
49 0.2 4 2 0.03944012707 0.635137383 0.99257835
50 0.3 4 2 0.0491580489 0.87045687 0.99829348
51 0.4 4 2 0.0633184796 0.961679634 0.999828802
52 0.5 4 2 0.0785727515 0.996049666 0.999905562
53 0.6 4 2 0.118468394 0.99986322 0.999134535
54 0.7 4 2 0.1952382107 0.999994091 0.9319280744
55 0.8 4 2 0.055013371 0.999999997 0.87224130919

43
LaTeX/plots/psqt.tex Normal file
View File

@ -0,0 +1,43 @@
% Authomatically generated by `dataAnalysis/chess.R`
\documentclass{standalone}
\usepackage[LSB, T1]{fontenc}
\usepackage{chessboard}
\usepackage{skak}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{xcolor}
\setboardfontencoding{LSB}
\setchessboard{linewidth = 0.1em, showmover = false, smallboard}
\definecolor{col1}{HTML}{5F1415} \definecolor{col2}{HTML}{641818} \definecolor{col3}{HTML}{681B1C} \definecolor{col4}{HTML}{6D1F1F} \definecolor{col5}{HTML}{722222} \definecolor{col6}{HTML}{772526} \definecolor{col7}{HTML}{7C2829} \definecolor{col8}{HTML}{812B2C} \definecolor{col9}{HTML}{862F2F} \definecolor{col10}{HTML}{8B3232} \definecolor{col11}{HTML}{903535} \definecolor{col12}{HTML}{953838} \definecolor{col13}{HTML}{9A3B3B} \definecolor{col14}{HTML}{9F3E3E} \definecolor{col15}{HTML}{A44141} \definecolor{col16}{HTML}{A94444} \definecolor{col17}{HTML}{AE4747} \definecolor{col18}{HTML}{B34A4A} \definecolor{col19}{HTML}{B74E4E} \definecolor{col20}{HTML}{BA5353} \definecolor{col21}{HTML}{BD5758} \definecolor{col22}{HTML}{C05C5C} \definecolor{col23}{HTML}{C26061} \definecolor{col24}{HTML}{C56565} \definecolor{col25}{HTML}{C7696A} \definecolor{col26}{HTML}{CA6E6E} \definecolor{col27}{HTML}{CD7272} \definecolor{col28}{HTML}{CF7677} \definecolor{col29}{HTML}{D17A7B} \definecolor{col30}{HTML}{D47F7F} \definecolor{col31}{HTML}{D68383} \definecolor{col32}{HTML}{D88787} \definecolor{col33}{HTML}{DA8B8C} \definecolor{col34}{HTML}{DC8F90} \definecolor{col35}{HTML}{DE9394} \definecolor{col36}{HTML}{E09898} \definecolor{col37}{HTML}{E29C9C} \definecolor{col38}{HTML}{E4A0A0} \definecolor{col39}{HTML}{E6A4A4} \definecolor{col40}{HTML}{E8A8A8} \definecolor{col41}{HTML}{E9ABAC} \definecolor{col42}{HTML}{EBAFAF} \definecolor{col43}{HTML}{EDB3B3} \definecolor{col44}{HTML}{EEB7B7} \definecolor{col45}{HTML}{EFBBBB} \definecolor{col46}{HTML}{F1BEBF} \definecolor{col47}{HTML}{F2C2C2} \definecolor{col48}{HTML}{F3C6C6} \definecolor{col49}{HTML}{F4C9C9} \definecolor{col50}{HTML}{F5CDCD} \definecolor{col51}{HTML}{F6D0D0} \definecolor{col52}{HTML}{F7D4D4} \definecolor{col53}{HTML}{F8D7D7} \definecolor{col54}{HTML}{F8DADA} \definecolor{col55}{HTML}{F9DEDE} \definecolor{col56}{HTML}{F9E1E1} \definecolor{col57}{HTML}{FAE4E4} \definecolor{col58}{HTML}{FAE7E7} \definecolor{col59}{HTML}{FAEAEA} \definecolor{col60}{HTML}{FAECEC} \definecolor{col61}{HTML}{F9EFEF} \definecolor{col62}{HTML}{F9F1F1} \definecolor{col63}{HTML}{F8F4F4} \definecolor{col64}{HTML}{F7F6F6} \definecolor{col65}{HTML}{F6F6F7} \definecolor{col66}{HTML}{F4F5F8} \definecolor{col67}{HTML}{F1F3F8} \definecolor{col68}{HTML}{EFF1F8} \definecolor{col69}{HTML}{ECEFF8} \definecolor{col70}{HTML}{EAEDF8} \definecolor{col71}{HTML}{E7EBF8} \definecolor{col72}{HTML}{E4E8F8} \definecolor{col73}{HTML}{E1E6F7} \definecolor{col74}{HTML}{DEE3F7} \definecolor{col75}{HTML}{DAE1F6} \definecolor{col76}{HTML}{D7DEF5} \definecolor{col77}{HTML}{D4DCF4} \definecolor{col78}{HTML}{D0D9F4} \definecolor{col79}{HTML}{CDD6F3} \definecolor{col80}{HTML}{C9D3F2} \definecolor{col81}{HTML}{C5D0F1} \definecolor{col82}{HTML}{C2CDEF} \definecolor{col83}{HTML}{BECAEE} \definecolor{col84}{HTML}{BAC7ED} \definecolor{col85}{HTML}{B6C4EC} \definecolor{col86}{HTML}{B2C1EA} \definecolor{col87}{HTML}{AEBEE9} \definecolor{col88}{HTML}{AABAE8} \definecolor{col89}{HTML}{A6B7E6} \definecolor{col90}{HTML}{A2B4E5} \definecolor{col91}{HTML}{9EB1E3} \definecolor{col92}{HTML}{9AADE2} \definecolor{col93}{HTML}{95AAE0} \definecolor{col94}{HTML}{91A6DF} \definecolor{col95}{HTML}{8DA3DD} \definecolor{col96}{HTML}{88A0DB} \definecolor{col97}{HTML}{849CDA} \definecolor{col98}{HTML}{7F99D8} \definecolor{col99}{HTML}{7A95D6} \definecolor{col100}{HTML}{7592D4} \definecolor{col101}{HTML}{708ED3} \definecolor{col102}{HTML}{6B8BD1} \definecolor{col103}{HTML}{6687CF} \definecolor{col104}{HTML}{6184CD} \definecolor{col105}{HTML}{5B80CC} \definecolor{col106}{HTML}{567DCA} \definecolor{col107}{HTML}{5079C8} \definecolor{col108}{HTML}{4975C7} \definecolor{col109}{HTML}{4372C5} \definecolor{col110}{HTML}{3B6EC3} \definecolor{col111}{HTML}{356BC1} \definecolor{col112}{HTML}{3167BC} \definecolor{col113}{HTML}{2E63B6} \definecolor{col114}{HTML}{2B60B1} \definecolor{col115}{HTML}{275CAC} \definecolor{col116}{HTML}{2459A7} \definecolor{col117}{HTML}{2055A2} \definecolor{col118}{HTML}{1C529D} \definecolor{col119}{HTML}{174E98} \definecolor{col120}{HTML}{124B93} \definecolor{col121}{HTML}{0C478E} \definecolor{col122}{HTML}{05448A} \definecolor{col123}{HTML}{004085} \definecolor{col124}{HTML}{003D80} \definecolor{col125}{HTML}{00397C} \definecolor{col126}{HTML}{003678} \definecolor{col127}{HTML}{003274} \definecolor{col128}{HTML}{002F70}
\begin{document}
\begin{tikzpicture}
\coordinate (pawn) at (0, 0);
\coordinate (knight) at (5, 0);
\coordinate (bishop) at (10, 0);
\coordinate (rook) at (0, -5.2);
\coordinate (queen) at (5, -5.2);
\coordinate (king) at (10, -5.2);
\node (pawn) at (pawn) {\chessboard[color=col64,colorbackfield=a8,color=col107,colorbackfield=a7,color=col76,colorbackfield=a6,color=col66,colorbackfield=a5,color=col67,colorbackfield=a4,color=col65,colorbackfield=a3,color=col66,colorbackfield=a2,color=col64,colorbackfield=a1,color=col64,colorbackfield=b8,color=col102,colorbackfield=b7,color=col75,colorbackfield=b6,color=col66,colorbackfield=b5,color=col66,colorbackfield=b4,color=col65,colorbackfield=b3,color=col66,colorbackfield=b2,color=col64,colorbackfield=b1,color=col64,colorbackfield=c8,color=col101,colorbackfield=c7,color=col75,colorbackfield=c6,color=col66,colorbackfield=c5,color=col66,colorbackfield=c4,color=col65,colorbackfield=c3,color=col66,colorbackfield=c2,color=col64,colorbackfield=c1,color=col64,colorbackfield=d8,color=col102,colorbackfield=d7,color=col74,colorbackfield=d6,color=col66,colorbackfield=d5,color=col67,colorbackfield=d4,color=col65,colorbackfield=d3,color=col66,colorbackfield=d2,color=col64,colorbackfield=d1,color=col64,colorbackfield=e8,color=col102,colorbackfield=e7,color=col74,colorbackfield=e6,color=col66,colorbackfield=e5,color=col67,colorbackfield=e4,color=col65,colorbackfield=e3,color=col66,colorbackfield=e2,color=col64,colorbackfield=e1,color=col64,colorbackfield=f8,color=col105,colorbackfield=f7,color=col76,colorbackfield=f6,color=col66,colorbackfield=f5,color=col67,colorbackfield=f4,color=col65,colorbackfield=f3,color=col66,colorbackfield=f2,color=col64,colorbackfield=f1,color=col64,colorbackfield=g8,color=col103,colorbackfield=g7,color=col74,colorbackfield=g6,color=col66,colorbackfield=g5,color=col67,colorbackfield=g4,color=col65,colorbackfield=g3,color=col66,colorbackfield=g2,color=col64,colorbackfield=g1,color=col64,colorbackfield=h8,color=col110,colorbackfield=h7,color=col76,colorbackfield=h6,color=col67,colorbackfield=h5,color=col67,colorbackfield=h4,color=col65,colorbackfield=h3,color=col67,colorbackfield=h2,color=col64,colorbackfield=h1]};
\node (knight) at (knight) {\chessboard[color=col88,colorbackfield=a8,color=col82,colorbackfield=a7,color=col78,colorbackfield=a6,color=col69,colorbackfield=a5,color=col70,colorbackfield=a4,color=col66,colorbackfield=a3,color=col70,colorbackfield=a2,color=col68,colorbackfield=a1,color=col105,colorbackfield=b8,color=col83,colorbackfield=b7,color=col75,colorbackfield=b6,color=col67,colorbackfield=b5,color=col68,colorbackfield=b4,color=col66,colorbackfield=b3,color=col68,colorbackfield=b2,color=col66,colorbackfield=b1,color=col88,colorbackfield=c8,color=col81,colorbackfield=c7,color=col77,colorbackfield=c6,color=col68,colorbackfield=c5,color=col69,colorbackfield=c4,color=col66,colorbackfield=c3,color=col69,colorbackfield=c2,color=col67,colorbackfield=c1,color=col104,colorbackfield=d8,color=col88,colorbackfield=d7,color=col79,colorbackfield=d6,color=col69,colorbackfield=d5,color=col70,colorbackfield=d4,color=col66,colorbackfield=d3,color=col70,colorbackfield=d2,color=col68,colorbackfield=d1,color=col88,colorbackfield=e8,color=col79,colorbackfield=e7,color=col74,colorbackfield=e6,color=col67,colorbackfield=e5,color=col68,colorbackfield=e4,color=col65,colorbackfield=e3,color=col68,colorbackfield=e2,color=col66,colorbackfield=e1,color=col92,colorbackfield=f8,color=col83,colorbackfield=f7,color=col78,colorbackfield=f6,color=col68,colorbackfield=f5,color=col70,colorbackfield=f4,color=col66,colorbackfield=f3,color=col70,colorbackfield=f2,color=col68,colorbackfield=f1,color=col125,colorbackfield=g8,color=col91,colorbackfield=g7,color=col78,colorbackfield=g6,color=col69,colorbackfield=g5,color=col70,colorbackfield=g4,color=col67,colorbackfield=g3,color=col70,colorbackfield=g2,color=col68,colorbackfield=g1,color=col93,colorbackfield=h8,color=col83,colorbackfield=h7,color=col78,colorbackfield=h6,color=col69,colorbackfield=h5,color=col70,colorbackfield=h4,color=col66,colorbackfield=h3,color=col70,colorbackfield=h2,color=col68,colorbackfield=h1]};
\node (bishop) at (bishop) {\chessboard[color=col73,colorbackfield=a8,color=col72,colorbackfield=a7,color=col71,colorbackfield=a6,color=col80,colorbackfield=a5,color=col70,colorbackfield=a4,color=col76,colorbackfield=a3,color=col67,colorbackfield=a2,color=col66,colorbackfield=a1,color=col70,colorbackfield=b8,color=col70,colorbackfield=b7,color=col69,colorbackfield=b6,color=col74,colorbackfield=b5,color=col69,colorbackfield=b4,color=col72,colorbackfield=b3,color=col66,colorbackfield=b2,color=col68,colorbackfield=b1,color=col71,colorbackfield=c8,color=col66,colorbackfield=c7,color=col66,colorbackfield=c6,color=col78,colorbackfield=c5,color=col66,colorbackfield=c4,color=col68,colorbackfield=c3,color=col66,colorbackfield=c2,color=col67,colorbackfield=c1,color=col68,colorbackfield=d8,color=col68,colorbackfield=d7,color=col67,colorbackfield=d6,color=col70,colorbackfield=d5,color=col67,colorbackfield=d4,color=col69,colorbackfield=d3,color=col66,colorbackfield=d2,color=col67,colorbackfield=d1,color=col68,colorbackfield=e8,color=col68,colorbackfield=e7,color=col67,colorbackfield=e6,color=col71,colorbackfield=e5,color=col67,colorbackfield=e4,color=col70,colorbackfield=e3,color=col66,colorbackfield=e2,color=col65,colorbackfield=e1,color=col73,colorbackfield=f8,color=col70,colorbackfield=f7,color=col68,colorbackfield=f6,color=col82,colorbackfield=f5,color=col66,colorbackfield=f4,color=col75,colorbackfield=f3,color=col67,colorbackfield=f2,color=col65,colorbackfield=f1,color=col71,colorbackfield=g8,color=col70,colorbackfield=g7,color=col69,colorbackfield=g6,color=col73,colorbackfield=g5,color=col70,colorbackfield=g4,color=col70,colorbackfield=g3,color=col66,colorbackfield=g2,color=col79,colorbackfield=g1,color=col73,colorbackfield=h8,color=col72,colorbackfield=h7,color=col70,colorbackfield=h6,color=col79,colorbackfield=h5,color=col70,colorbackfield=h4,color=col75,colorbackfield=h3,color=col67,colorbackfield=h2,color=col64,colorbackfield=h1]};
\node (rook) at (rook) {\chessboard[color=col104,colorbackfield=a8,color=col95,colorbackfield=a7,color=col105,colorbackfield=a6,color=col103,colorbackfield=a5,color=col97,colorbackfield=a4,color=col81,colorbackfield=a3,color=col84,colorbackfield=a2,color=col89,colorbackfield=a1,color=col95,colorbackfield=b8,color=col90,colorbackfield=b7,color=col97,colorbackfield=b6,color=col97,colorbackfield=b5,color=col92,colorbackfield=b4,color=col77,colorbackfield=b3,color=col81,colorbackfield=b2,color=col84,colorbackfield=b1,color=col105,colorbackfield=c8,color=col96,colorbackfield=c7,color=col106,colorbackfield=c6,color=col104,colorbackfield=c5,color=col98,colorbackfield=c4,color=col82,colorbackfield=c3,color=col85,colorbackfield=c2,color=col90,colorbackfield=c1,color=col89,colorbackfield=d8,color=col86,colorbackfield=d7,color=col91,colorbackfield=d6,color=col91,colorbackfield=d5,color=col87,colorbackfield=d4,color=col74,colorbackfield=d3,color=col79,colorbackfield=d2,color=col80,colorbackfield=d1,color=col93,colorbackfield=e8,color=col88,colorbackfield=e7,color=col95,colorbackfield=e6,color=col94,colorbackfield=e5,color=col90,colorbackfield=e4,color=col75,colorbackfield=e3,color=col80,colorbackfield=e2,color=col83,colorbackfield=e1,color=col100,colorbackfield=f8,color=col93,colorbackfield=f7,color=col102,colorbackfield=f6,color=col100,colorbackfield=f5,color=col95,colorbackfield=f4,color=col79,colorbackfield=f3,color=col83,colorbackfield=f2,color=col88,colorbackfield=f1,color=col97,colorbackfield=g8,color=col92,colorbackfield=g7,color=col99,colorbackfield=g6,color=col98,colorbackfield=g5,color=col93,colorbackfield=g4,color=col79,colorbackfield=g3,color=col83,colorbackfield=g2,color=col84,colorbackfield=g1,color=col106,colorbackfield=h8,color=col96,colorbackfield=h7,color=col108,colorbackfield=h6,color=col105,colorbackfield=h5,color=col99,colorbackfield=h4,color=col82,colorbackfield=h3,color=col85,colorbackfield=h2,color=col91,colorbackfield=h1]};
\node (queen) at (queen) {\chessboard[color=col126,colorbackfield=a8,color=col125,colorbackfield=a7,color=col124,colorbackfield=a6,color=col122,colorbackfield=a5,color=col117,colorbackfield=a4,color=col110,colorbackfield=a3,color=col108,colorbackfield=a2,color=col99,colorbackfield=a1,color=col125,colorbackfield=b8,color=col125,colorbackfield=b7,color=col124,colorbackfield=b6,color=col123,colorbackfield=b5,color=col118,colorbackfield=b4,color=col111,colorbackfield=b3,color=col110,colorbackfield=b2,color=col101,colorbackfield=b1,color=col124,colorbackfield=c8,color=col126,colorbackfield=c7,color=col126,colorbackfield=c6,color=col125,colorbackfield=c5,color=col122,colorbackfield=c4,color=col117,colorbackfield=c3,color=col115,colorbackfield=c2,color=col105,colorbackfield=c1,color=col109,colorbackfield=d8,color=col118,colorbackfield=d7,color=col120,colorbackfield=d6,color=col120,colorbackfield=d5,color=col122,colorbackfield=d4,color=col124,colorbackfield=d3,color=col122,colorbackfield=d2,color=col111,colorbackfield=d1,color=col124,colorbackfield=e8,color=col128,colorbackfield=e7,color=col128,colorbackfield=e6,color=col127,colorbackfield=e5,color=col126,colorbackfield=e4,color=col122,colorbackfield=e3,color=col120,colorbackfield=e2,color=col109,colorbackfield=e1,color=col125,colorbackfield=f8,color=col126,colorbackfield=f7,color=col126,colorbackfield=f6,color=col124,colorbackfield=f5,color=col120,colorbackfield=f4,color=col114,colorbackfield=f3,color=col113,colorbackfield=f2,color=col103,colorbackfield=f1,color=col127,colorbackfield=g8,color=col125,colorbackfield=g7,color=col124,colorbackfield=g6,color=col122,colorbackfield=g5,color=col115,colorbackfield=g4,color=col106,colorbackfield=g3,color=col105,colorbackfield=g2,color=col97,colorbackfield=g1,color=col127,colorbackfield=h8,color=col123,colorbackfield=h7,color=col122,colorbackfield=h6,color=col120,colorbackfield=h5,color=col112,colorbackfield=h4,color=col102,colorbackfield=h3,color=col101,colorbackfield=h2,color=col94,colorbackfield=h1]};
\node (king) at (king) {\chessboard[color=col55,colorbackfield=a8,color=col56,colorbackfield=a7,color=col56,colorbackfield=a6,color=col56,colorbackfield=a5,color=col56,colorbackfield=a4,color=col55,colorbackfield=a3,color=col58,colorbackfield=a2,color=col65,colorbackfield=a1,color=col57,colorbackfield=b8,color=col59,colorbackfield=b7,color=col59,colorbackfield=b6,color=col58,colorbackfield=b5,color=col58,colorbackfield=b4,color=col57,colorbackfield=b3,color=col60,colorbackfield=b2,color=col69,colorbackfield=b1,color=col58,colorbackfield=c8,color=col58,colorbackfield=c7,color=col58,colorbackfield=c6,color=col58,colorbackfield=c5,color=col58,colorbackfield=c4,color=col58,colorbackfield=c3,color=col60,colorbackfield=c2,color=col65,colorbackfield=c1,color=col57,colorbackfield=d8,color=col58,colorbackfield=d7,color=col58,colorbackfield=d6,color=col57,colorbackfield=d5,color=col57,colorbackfield=d4,color=col57,colorbackfield=d3,color=col59,colorbackfield=d2,color=col64,colorbackfield=d1,color=col57,colorbackfield=e8,color=col58,colorbackfield=e7,color=col58,colorbackfield=e6,color=col58,colorbackfield=e5,color=col58,colorbackfield=e4,color=col58,colorbackfield=e3,color=col60,colorbackfield=e2,color=col64,colorbackfield=e1,color=col62,colorbackfield=f8,color=col62,colorbackfield=f7,color=col62,colorbackfield=f6,color=col61,colorbackfield=f5,color=col61,colorbackfield=f4,color=col61,colorbackfield=f3,color=col63,colorbackfield=f2,color=col67,colorbackfield=f1,color=col61,colorbackfield=g8,color=col62,colorbackfield=g7,color=col62,colorbackfield=g6,color=col62,colorbackfield=g5,color=col62,colorbackfield=g4,color=col61,colorbackfield=g3,color=col63,colorbackfield=g2,color=col70,colorbackfield=g1,color=col60,colorbackfield=h8,color=col61,colorbackfield=h7,color=col61,colorbackfield=h6,color=col60,colorbackfield=h5,color=col60,colorbackfield=h4,color=col60,colorbackfield=h3,color=col61,colorbackfield=h2,color=col64,colorbackfield=h1]};
\node[anchor = north, yshift = -0.4em] at (pawn.north) {Pawn};
\node[anchor = north, yshift = -0.4em] at (knight.north) {Knight};
\node[anchor = north, yshift = -0.4em] at (bishop.north) {Bishop};
\node[anchor = north, yshift = -0.4em] at (rook.north) {Rook};
\node[anchor = north, yshift = -0.4em] at (queen.north) {Queen};
\node[anchor = north, yshift = -0.4em] at (king.north) {King};
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,95 @@
%%% R code to generate the input data files from corresponding simulation logs
% R> setwd("~/Work/tensorPredictors")
% R>
% R> for (sim.name in c("2a")) {
% R> pattern <- paste0("sim\\_", sim.name, "\\_ising\\-[0-9T]*\\.csv")
% R> log.file <- sort(
% R> list.files(path = "sim/", pattern = pattern, full.names = TRUE),
% R> decreasing = TRUE
% R> )[[1]]
% R>
% R> sim <- read.csv(log.file)
% R>
% R> aggr <- aggregate(sim[, names(sim) != "sample.size"], list(sample.size = sim$sample.size), mean)
% R>
% R> write.table(aggr, file = paste0("LaTeX/plots/aggr-", sim.name, "-ising.csv"), row.names = FALSE, quote = FALSE)
% R> }
\documentclass[border=0cm]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{amssymb, bm}
\definecolor{exact}{RGB}{230,0,0}
\definecolor{MC}{RGB}{30,180,30}
\definecolor{MCthrd}{RGB}{0,0,230}
\pgfplotsset{
compat=newest,
grid=both,
grid style={gray!15}
}
\tikzset{
legend entry/.style={
mark = *,
mark size = 1pt,
mark indices = {2},
line width=0.8pt
}
}
\begin{document}
\begin{tikzpicture}[>=latex]
\begin{axis}[
name=perft,
xmode = normal, ymode = log,
xtick={10, 30, 50, 70, 90, 110, 130},
mark = *,
mark size = 1pt,
ytick={1,1e1,1e2,1e3,1e4,1e5,1e6,1e7},
yticklabels={$1\mu s$,$10\mu s$,$100\mu s$,$1 ms$,$10 ms$,$100 ms$,$1 s$,$10 s$},
xlabel = {Dimension $p$},
ylabel = {Time}
]
\addplot[
only marks,
color = exact
] table[x = dim, y = exact] {aggr-ising-perft-m2.csv};
\addplot[
only marks,
color = MC
] table[x = dim, y = MC] {aggr-ising-perft-m2.csv};
\addplot[
only marks,
color = MCthrd
] table[x = dim, y = MCthrd] {aggr-ising-perft-m2.csv};
\addplot[smooth, domain = 8:25, color = exact, samples = 64] { 2^(x - 3) };
\addplot[smooth, domain = 1:130, color = MC, samples = 64] {
-18340.8 + 7557.0 * x + 200.3 * x^2
};
\addplot[smooth, domain = 1:130, color = MCthrd, samples = 64] {
8413.21 + 3134.98 * x + 41.87 * x^2
};
\end{axis}
\matrix[anchor = west] at (perft.east) {
\draw[color=exact, only marks, mark = *, mark size = 1pt, mark indices = {2}] plot coordinates {(0, 0) (.3, 0) (.6, 0)};
& \node[anchor=west] {exact}; \\
\draw[color=exact, line width = 0.8pt] plot coordinates {(0, 0) (.4, 0)};
& \node[anchor=west] {$\mathcal{O}(2^p)$}; \\
\draw[color=MC, only marks, mark = *, mark size = 1pt, mark indices = {2}] plot coordinates {(0, 0) (.3, 0) (.6, 0)};
& \node[anchor=west] {MC}; \\
\draw[color=MC, line width = 0.8pt] plot coordinates {(0, 0) (.4, 0)};
& \node[anchor=west] {$\mathcal{O}(p^2)$}; \\
\draw[color=MCthrd, only marks, mark = *, mark size = 1pt, mark indices = {2}] plot coordinates {(0, 0) (.3, 0) (.6, 0)};
& \node[anchor=west] {MC (8 thrd)}; \\
\draw[color=MCthrd, line width = 0.8pt] plot coordinates {(0, 0) (.4, 0)};
& \node[anchor=west] {$\mathcal{O}(p^2)$}; \\
};
\node[anchor = south] at (current bounding box.north) {Ising Second Moment Performance Test};
\end{tikzpicture}
\end{document}

View File

@ -1,7 +1,7 @@
%%% R code to generate the input data files from corresponding simulation logs
% R> setwd("~/Work/tensorPredictors")
% R>
% R> for (sim.name in c("2a")) {
% R> for (sim.name in c("2a", "2b", "2c", "2d")) {
% R> pattern <- paste0("sim\\_", sim.name, "\\_ising\\-[0-9T]*\\.csv")
% R> log.file <- sort(
% R> list.files(path = "sim/", pattern = pattern, full.names = TRUE),
@ -66,7 +66,7 @@
\addplot[color = clpca] table[x = sample.size, y = dist.subspace.clpca] {aggr-2a-ising.csv};
\end{axis}
\node[anchor = base west, yshift = 0.3em] at (sim-2a.north west) {
a: small
a: linear dependence on $\mathcal{F}_y \equiv y$
};
\begin{axis}[
name=sim-2b,
@ -83,7 +83,7 @@
\addplot[color = clpca] table[x = sample.size, y = dist.subspace.clpca] {aggr-2b-ising.csv};
\end{axis}
\node[anchor = base west, yshift = 0.3em] at (sim-2b.north west) {
b:
b: quadratic dependence on $y$
};
\begin{axis}[
name=sim-2c,
@ -99,7 +99,7 @@
\addplot[color = clpca] table[x = sample.size, y = dist.subspace.clpca] {aggr-2c-ising.csv};
\end{axis}
\node[anchor = base west, yshift = 0.3em] at (sim-2c.north west) {
c:
c: rank 1 $\boldsymbol{\beta}$'s
};
\begin{axis}[
@ -116,83 +116,21 @@
\addplot[color = clpca] table[x = sample.size, y = dist.subspace.clpca] {aggr-2d-ising.csv};
\end{axis}
\node[anchor = base west, yshift = 0.3em] at (sim-2d.north west) {
d:
d: interaction constraints via $\boldsymbol{\Omega}$'s
};
% \begin{axis}[
% name=sim-1b,
% anchor=north west, at={(sim-2a.right of north east)}, xshift=0.1cm,
% xticklabel=\empty,
% ylabel near ticks, yticklabel pos=right
% ]
% \addplot[color = pca] table[x = sample.size, y = dist.subspace.pca] {aggr-1b-normal.csv};
% \addplot[color = hopca] table[x = sample.size, y = dist.subspace.hopca] {aggr-1b-normal.csv};
% \addplot[color = tsir] table[x = sample.size, y = dist.subspace.tsir] {aggr-1b-normal.csv};
% \addplot[color = mgcca] table[x = sample.size, y = dist.subspace.mgcca] {aggr-1b-normal.csv};
% \addplot[color = gmlm, line width=1pt] table[x = sample.size, y = dist.subspace.gmlm] {aggr-1b-normal.csv};
% \end{axis}
% \node[anchor = base west, yshift = 0.3em] at (sim-1b.north west) {
% b: cubic dependence on $y$
% };
% \begin{axis}[
% name=sim-1c,
% anchor=north west, at={(sim-2a.below south west)}, yshift=-.8em,
% xticklabel=\empty
% ]
% \addplot[color = pca] table[x = sample.size, y = dist.subspace.pca] {aggr-1c-normal.csv};
% \addplot[color = hopca] table[x = sample.size, y = dist.subspace.hopca] {aggr-1c-normal.csv};
% \addplot[color = tsir] table[x = sample.size, y = dist.subspace.tsir] {aggr-1c-normal.csv};
% \addplot[color = mgcca] table[x = sample.size, y = dist.subspace.mgcca] {aggr-1c-normal.csv};
% \addplot[color = gmlm, line width=1pt] table[x = sample.size, y = dist.subspace.gmlm] {aggr-1c-normal.csv};
% \end{axis}
% \node[anchor = base west, yshift = 0.3em] at (sim-1c.north west) {
% c: rank $1$ $\boldsymbol{\beta}$'s
% };
% \begin{axis}[
% name=sim-1d,
% anchor=north west, at={(sim-1c.right of north east)}, xshift=0.1cm,
% ylabel near ticks, yticklabel pos=right
% ]
% \addplot[color = pca] table[x = sample.size, y = dist.subspace.pca] {aggr-1d-normal.csv};
% \addplot[color = hopca] table[x = sample.size, y = dist.subspace.hopca] {aggr-1d-normal.csv};
% \addplot[color = tsir] table[x = sample.size, y = dist.subspace.tsir] {aggr-1d-normal.csv};
% \addplot[color = mgcca] table[x = sample.size, y = dist.subspace.mgcca] {aggr-1d-normal.csv};
% \addplot[color = gmlm, line width=1pt] table[x = sample.size, y = dist.subspace.gmlm] {aggr-1d-normal.csv};
% \end{axis}
% \node[anchor = base west, yshift = 0.3em] at (sim-1d.north west) {
% d: tri-diagonal $\boldsymbol{\Omega}$'s
% };
% \begin{axis}[
% name=sim-1e,
% anchor=north west, at={(sim-1c.below south west)}, yshift=-.8em
% ]
% \addplot[color = pca] table[x = sample.size, y = dist.subspace.pca] {aggr-1e-normal.csv};
% \addplot[color = hopca] table[x = sample.size, y = dist.subspace.hopca] {aggr-1e-normal.csv};
% \addplot[color = tsir] table[x = sample.size, y = dist.subspace.tsir] {aggr-1e-normal.csv};
% \addplot[color = mgcca] table[x = sample.size, y = dist.subspace.mgcca] {aggr-1e-normal.csv};
% \addplot[color = gmlm, line width=1pt] table[x = sample.size, y = dist.subspace.gmlm] {aggr-1e-normal.csv};
% \end{axis}
% \node[anchor = base west, yshift = 0.3em] at (sim-1e.north west) {
% e: missspecified
% };
\matrix[anchor = west] at (sim-2a.right of east) {
\draw[color=gmlm, legend entry, line width=1pt] plot coordinates {(0, 0) (.3, 0) (.6, 0)}; & \node[anchor=west] {GMLM}; \\
\draw[color=tsir, legend entry] plot coordinates {(0, 0) (.3, 0) (.6, 0)}; & \node[anchor=west] {TSIR}; \\
\draw[color=mgcca, legend entry] plot coordinates {(0, 0) (.3, 0) (.6, 0)}; & \node[anchor=west] {MGCCA}; \\
\draw[color=hopca, legend entry] plot coordinates {(0, 0) (.3, 0) (.6, 0)}; & \node[anchor=west] {HOPCA}; \\
\draw[color=pca, legend entry] plot coordinates {(0, 0) (.3, 0) (.6, 0)}; & \node[anchor=west] {PCA}; \\
\draw[color=lpca, legend entry] plot coordinates {(0, 0) (.3, 0) (.6, 0)}; & \node[anchor=west] {LPCA}; \\
\draw[color=clpca, legend entry] plot coordinates {(0, 0) (.3, 0) (.6, 0)}; & \node[anchor=west] {CLPCA}; \\
};
\node[anchor = north] at (current bounding box.south) {Sample Size $n$};
\matrix[anchor = north] at (current bounding box.south) {
\draw[color=gmlm, legend entry, line width=1pt] plot coordinates {(0, 0) (.3, 0) (.6, 0)}; & \node[anchor=west] {GMLM}; &
\draw[color=tsir, legend entry] plot coordinates {(0, 0) (.3, 0) (.6, 0)}; & \node[anchor=west] {TSIR}; &
\draw[color=mgcca, legend entry] plot coordinates {(0, 0) (.3, 0) (.6, 0)}; & \node[anchor=west] {MGCCA}; &
\draw[color=hopca, legend entry] plot coordinates {(0, 0) (.3, 0) (.6, 0)}; & \node[anchor=west] {HOPCA}; &
\draw[color=pca, legend entry] plot coordinates {(0, 0) (.3, 0) (.6, 0)}; & \node[anchor=west] {PCA}; &
\draw[color=lpca, legend entry] plot coordinates {(0, 0) (.3, 0) (.6, 0)}; & \node[anchor=west] {LPCA}; &
\draw[color=clpca, legend entry] plot coordinates {(0, 0) (.3, 0) (.6, 0)}; & \node[anchor=west] {CLPCA}; \\
};
\node[anchor = south, rotate = 90] at (current bounding box.west) {Subspace Distance $d(\boldsymbol{B}, \hat{\boldsymbol{B}})$};
\node[anchor = south, rotate = 270] at (current bounding box.east) {\phantom{Subspace Distance $d(\boldsymbol{B}, \hat{\boldsymbol{B}})$}};

114
LaTeX/plots/sim-tsir.tex Normal file
View File

@ -0,0 +1,114 @@
%%% R code to generate the input data files from corresponding simulation logs
% R> setwd("~/Work/tensorPredictors")
% R>
% R> sim <- read.csv("sim/sim-tsir-20231123T1155.csv")
% R>
% R> aggr <- aggregate(sim[startsWith(names(sim), "dist")], sim[c("rho", "order", "beta.version")], mean)
% R>
% R> write.table(aggr, file = "LaTeX/plots/aggr-tsir.csv", row.names = FALSE, quote = FALSE)
\documentclass[border=0cm]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{bm}
\definecolor{gmlm}{RGB}{0,0,0}
% \definecolor{mgcca}{RGB}{86,180,233}
\definecolor{tsir}{RGB}{0,158,115}
\definecolor{sir}{RGB}{86,180,233}
% \definecolor{hopca}{RGB}{230,159,0}
% \definecolor{pca}{RGB}{240,228,66}
% \definecolor{lpca}{RGB}{0,114,178}
% \definecolor{clpca}{RGB}{213,94,0}
\pgfplotsset{
compat=newest,
every axis/.style={
% grid,
% grid style={gray, dotted},
3d box = complete*,
xtick = {0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8},
ytick = {2, 3, 4},
ymin = 1.5, ymax = 4.5,
ztick = {0.2, 0.4, 0.6, 0.8, 1},
zmin = 0, zmax = 1,
xlabel = $\rho$,
ylabel = $r$
}
}
\tikzset{
legend entry/.style={
mark = *,
mark size = 1pt,
mark indices = {2},
line width=0.8pt
}
}
\newcommand{\addarea}[4]{
\addplot3[
fill = #1,
draw = none,
fill opacity = 0.65,
y filter/.append expression={
\thisrow{order} == #3 && \thisrow{beta.version} == #2 ? #4 : NaN
}
] table [x = rho, y expr = NaN, z = dist.subspace.#1] {aggr-tsir.csv} \closedcycle;
\addplot3[
color = #1,
line width = 0.8pt,
y filter/.append expression={
\thisrow{order} == #3 && \thisrow{beta.version} == #2 ? #4 : NaN
}
] table [x = rho, y expr = NaN, z = dist.subspace.#1] {aggr-tsir.csv};
}
\begin{document}
\begin{tikzpicture}[>=latex]
\begin{axis}[
name=v1
]
\addarea{sir}{1}{4}{4.05};
\addarea{tsir}{1}{4}{4.0};
\addarea{gmlm}{1}{4}{3.95};
\addarea{sir}{1}{3}{3.05};
\addarea{tsir}{1}{3}{3.0};
\addarea{gmlm}{1}{3}{2.95};
\addarea{sir}{1}{2}{2.05};
\addarea{tsir}{1}{2}{2.0};
\addarea{gmlm}{1}{2}{1.95};
\end{axis}
\node[anchor = south] at (v1.north) {V1};
\begin{axis}[
name=v2,
xshift = 8cm
]
\addarea{sir}{2}{4}{4.05};
\addarea{tsir}{2}{4}{4.0};
\addarea{gmlm}{2}{4}{3.95};
\addarea{sir}{2}{3}{3.05};
\addarea{tsir}{2}{3}{3.0};
\addarea{gmlm}{2}{3}{2.95};
\addarea{sir}{2}{2}{2.05};
\addarea{tsir}{2}{2}{2.0};
\addarea{gmlm}{2}{2}{1.95};
\end{axis}
\node[anchor = south] at (v2.north) {V2};
\matrix[anchor = north] at (current bounding box.south) {
\fill[color = gmlm, opacity = 0.65] (0, -.1) rectangle (.6, .1); \draw[color=gmlm, line width = 0.8pt] (0, .1) -- (.6, .1); & \node[anchor=west] {GMLM}; &
\fill[color = tsir, opacity = 0.65] (0, -.1) rectangle (.6, .1); \draw[color=tsir, line width = 0.8pt] (0, .1) -- (.6, .1); & \node[anchor=west] {TSIR}; &
\fill[color = sir, opacity = 0.65] (0, -.1) rectangle (.6, .1); \draw[color=sir, line width = 0.8pt] (0, .1) -- (.6, .1); & \node[anchor=west] {SIR}; \\
};
\node[anchor = south, rotate = 90, yshift = 1.5em] at (v1.west) {Subspace Distance $d(\boldsymbol{B}, \widehat{\boldsymbol{B}})$};
\node[anchor = south, rotate = -90, yshift = 1.5em] at (v2.east) {\phantom{Subspace Distance $d(\boldsymbol{B}, \widehat{\boldsymbol{B}})$}};
\end{tikzpicture}
\end{document}

View File

@ -0,0 +1,26 @@
# Source dependency setup
INCLUDE = Rchess/inst/include/SchachHoernchen
SRC = $(notdir $(wildcard $(INCLUDE)/*.cpp))
OBJ = $(SRC:.cpp=.o)
# Compiler config
CC = g++
FLAGS = -I$(INCLUDE) -Wall -Wextra -Wpedantic -pedantic -pthread -O3 -march=native -mtune=native
CPPFLAGS = $(FLAGS) -std=c++17
LDFLAGS = $(FLAGS)
.PHONY: all clean
%.o: $(INCLUDE)/%.cpp
$(CC) $(CPPFLAGS) -c $< -o $(notdir $@)
pgn2fen.o: pgn2fen.cpp
$(CC) $(CPPFLAGS) -c $< -o $@
pgn2fen: pgn2fen.o $(OBJ)
$(CC) $(LDFLAGS) -o $@ $^
all: pgn2fen
clean:
rm -f *.out *.o *.h.gch pgn2fen

View File

@ -0,0 +1,15 @@
Package: Rchess
Type: Package
Title: Wrapper to the SchachHoernchen engine
Version: 1.0
Date: 2022-06-12
Author: loki
Maintainer: Your Name <your@email.com>
Description: Basic wrapper to the underlying C++ code of the SchachHoernchen
engine. Primarely intended to provide chess specific data processing.
Encoding: UTF-8
License: GPL (>= 2)
Imports: Rcpp (>= 1.0.8)
LinkingTo: Rcpp
SystemRequirements: c++17
RoxygenNote: 7.2.0

View File

@ -0,0 +1,4 @@
useDynLib(Rchess, .registration=TRUE)
importFrom(Rcpp, evalCpp)
exportPattern("^[[:alpha:]]+")
S3method(print, board)

View File

@ -0,0 +1,124 @@
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Human Crafted Evaluation
HCE <- function(positions) {
.Call(`_Rchess_HCE`, positions)
}
#' Given a FEN (position) determines if its whites turn
isWhiteTurn <- function(positions) {
.Call(`_Rchess_isWhiteTurn`, positions)
}
#' Check if current side to move is in check
isCheck <- function(positions) {
.Call(`_Rchess_isCheck`, positions)
}
#' Check if the current position is a quiet position (no piece is attacked)
isQuiet <- function(positions) {
.Call(`_Rchess_isQuiet`, positions)
}
#' Check if position is terminal
#'
#' Checks if the position is a terminal position, meaning if the game ended
#' by mate, stale mate or the 50 modes rule. Three-Fold repetition is NOT
#' checked, therefore a seperate game history is required which the board
#' does NOT track.
#'
isTerminal <- function(positions) {
.Call(`_Rchess_isTerminal`, positions)
}
#' Check if checkmate is possible by material on the board
#'
#' Checks if there is sufficient mating material on the board, meaning if it
#' possible for any side to deliver a check mate. More specifically, it
#' checks if the pieces on the board are KK, KNK or KBK.
#'
isInsufficient <- function(positions) {
.Call(`_Rchess_isInsufficient`, positions)
}
#' Specialized version of `read_cyclic.cpp` taylored to work in conjunction with
#' `gmlm_chess()` as data generator to provide random draws from a FEN data set
#' with scores filtered to be in in the range `score_min` to `score_max`.
#'
data.gen <- function(file, sample_size, score_min = -5.0, score_max = +5.0, quiet = FALSE, min_ply_count = 10L, white_only = TRUE) {
.Call(`_Rchess_data_gen`, file, sample_size, score_min, score_max, quiet, min_ply_count, white_only)
}
#' Human Crafted Evaluation
eval.psqt <- function(positions, psqt, pawn_structure = FALSE, eval_rooks = FALSE, eval_king = FALSE) {
.Call(`_Rchess_eval_psqt`, positions, psqt, pawn_structure, eval_rooks, eval_king)
}
#' Convert a legal FEN string to a 3D binary (integer with 0-1 entries) array
fen2int <- function(boards) {
.Call(`_Rchess_fen2int`, boards)
}
#' Reads lines from a text file with recycling.
#'
read.cyclic <- function(file, nrows = 1000L, skip = 100L, start = 1L, line_len = 64L) {
.Call(`_Rchess_read_cyclic`, file, nrows, skip, start, line_len)
}
#' Samples a legal move from a given position
sample.move <- function(pos) {
.Call(`_Rchess_sample_move`, pos)
}
#' Samples a random FEN (position) by applying `ply` random moves to the start
#' position.
#'
#' @param nr number of positions to sample
#' @param min_depth minimum number of random ply's to generate random positions
#' @param max_depth maximum number of random ply's to generate random positions
sample.fen <- function(nr, min_depth = 4L, max_depth = 20L) {
.Call(`_Rchess_sample_fen`, nr, min_depth, max_depth)
}
#' Converts a FEN string to a Board (position) or return the current internal state
board <- function(fen = "") {
.Call(`_Rchess_board`, fen)
}
print.board <- function(fen = "") {
invisible(.Call(`_Rchess_print_board`, fen))
}
print.moves <- function(fen = "") {
invisible(.Call(`_Rchess_print_moves`, fen))
}
print.bitboards <- function(fen = "") {
invisible(.Call(`_Rchess_print_bitboards`, fen))
}
position <- function(pos, moves, san = FALSE) {
.Call(`_Rchess_position`, pos, moves, san)
}
perft <- function(depth = 6L) {
invisible(.Call(`_Rchess_perft`, depth))
}
go <- function(depth = 6L) {
.Call(`_Rchess_go`, depth)
}
ucinewgame <- function() {
invisible(.Call(`_Rchess_ucinewgame`))
}
.onLoad <- function(libname, pkgname) {
invisible(.Call(`_Rchess_onLoad`, libname, pkgname))
}
.onUnload <- function(libpath) {
invisible(.Call(`_Rchess_onUnload`, libpath))
}

View File

@ -0,0 +1,82 @@
#ifndef INCLUDE_GUARD_RCHESS_TYPES
#define INCLUDE_GUARD_RCHESS_TYPES
#include <RcppCommon.h>
#include "SchachHoernchen/Move.h"
#include "SchachHoernchen/Board.h"
#include "SchachHoernchen/uci.h"
namespace Rcpp {
template <> Move as(SEXP);
template <> SEXP wrap(const Move&);
template <> Board as(SEXP);
template <> SEXP wrap(const Board&);
} /* namespace Rcpp */
#include <Rcpp.h>
namespace Rcpp {
// Convert a coordinate encoded move string into a Move
template <>
Move as(SEXP obj) {
// parse (and validate) the move
bool parseError = false;
Move move = UCI::parseMove(Rcpp::as<std::string>(obj), parseError);
if (parseError) {
Rcpp::stop("Error parsing move");
}
return move;
}
// Convert a Move into an `R` character
template <>
SEXP wrap(const Move& move) {
return Rcpp::CharacterVector::create(UCI::formatMove(move));
}
// Convert a FEN string to a board
template <>
Board as(SEXP obj) {
bool parseError = false;
Board board;
std::string fen = Rcpp::as<std::string>(obj);
if (fen != "startpos") {
board.init(fen, parseError);
}
if (parseError) {
Rcpp::stop("Parsing FEN failed");
}
return board;
}
// Convert board to `R` board class (as character FEN string)
template <>
SEXP wrap(const Board& board) {
auto obj = Rcpp::CharacterVector::create(board.fen());
obj.attr("class") = "board";
return obj;
}
// Convert a character vector or list to a vector of Boards
template <>
std::vector<Board> as(SEXP obj) {
// Convert SEXP to be a vector of string
auto fens = Rcpp::as<std::vector<std::string>>(obj);
// Try to parse every string as a Board from a FEN
std::vector<Board> boards(fens.size());
for (int i = 0; i < fens.size(); ++i) {
bool parseError = false;
if (fens[i] != "startpos") {
boards[i].init(fens[i], parseError);
}
if (parseError) {
Rcpp::stop("Parsing FEN nr. %d failed", i + 1);
}
}
return boards;
}
} /* namespace Rcpp */
#endif /* INCLUDE_GUARD_RCHESS_TYPES */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,224 @@
#ifndef INCLUDE_GUARD_BOARD_H
#define INCLUDE_GUARD_BOARD_H
#include <string>
#include <array>
#include <functional> // for std::hash
#include "types.h"
// Forward declarations
class Move;
class MoveList;
// pseudo-random-number-generator to fill Zobrist lookup hash table
static constexpr u64 rot(u64 val, int shift) {
return (val << shift) | (val >> (64 - shift));
}
static constexpr u64 random(u64& a, u64& b, u64& c, u64& d) {
u64 e = a - rot(b, 7);
a = b ^ rot(b, 13);
b = c + rot(d, 37);
c = d + e;
d = e + a;
return d;
}
/**
* BitBoard indexing;
* @verbatim
* rank rankIndex
* | index |
* v +-------------------------+ v
* 8 | 0 1 2 3 4 5 6 7 | 0
* 7 | 8 9 10 11 12 13 14 15 | 1
* 6 | 16 17 18 19 20 21 22 23 | 2
* 5 | 24 25 26 27 28 29 30 31 | 3
* 4 | 32 33 34 35 36 37 38 39 | 4
* 3 | 40 41 42 43 44 45 46 47 | 5
* 2 | 48 49 50 51 52 53 54 55 | 6
* 1 | 56 57 58 59 60 61 62 63 | 7
* +-------------------------+
* a b c d e f g h <- file
* 0 1 2 3 4 5 6 7 <- fileIndex
* @endverbatim
*/
class Board {
public:
Board()
: _castle{true, true, true, true}
, _enPassant{static_cast<Index>(64)}
, _halfMoveClock{0}
, _plyCount{1}
, _bitBoard{
0xFFFF000000000000, // white
0x000000000000FFFF, // black
0x00FF00000000FF00, // pawns
0x4200000000000042, // knights
0x2400000000000024, // bishops
0x8100000000000081, // rooks
0x0800000000000008, // queens
0x1000000000000010, // kings
} {
_hash = rehash(); // This makes it non default constructible
}; // but the main performance requirement is in the
// copy construc