\begin{tikzpicture}[baseline]

\pgfplotstableread[col sep=comma]{./data/toy_data_metrics.csv}{\datatable};
\begin{axis}[
width=\columnwidth,
height=.7\columnwidth,
ylabel={NLL ($\downarrow$)},
xlabel={features $d$},
title={Toy data with covariate correlation},
xmin=19,
xmax=121,
ymin=-1,
ymax=5,
legend style={font=\tiny, 
	fill opacity=0.8, text opacity =1,
        at={(1,1)},anchor=north east,
        row sep=-3pt,
        },
legend cell align={left},
% ytick={0, 0.08}, % Define the desired y tick positions
xtick={20, 40, 60, 80, 100, 120}, % Define the desired y tick positions
yticklabel style={
	% /pgf/number format/fixed, % Use fixed point notation
	% /pgf/number format/precision=2, % Set the number of decimal places
	% /pgf/number format/fixed zerofill, % Fill in trailing zeros
        },
% ymode=log,
]


% % RBF
% \addplot+ [lightgreen, 
% mark=*,
% mark options={solid},
% % mark size=5pt, 
% thick,
% error bars/.cd,
% x dir=both,x explicit,
% y dir=both,y explicit,
% error bar style={solid}
% ]
% table[x=features,y=GP_RBF_NLPD_mean,y error=GP_RBF_NLPD_std, restrict x to domain=20:120, unbounded coords=discard] {\datatable};


% Laplace
\addplot+ [darkgreen, 
mark=*,
mark options={solid},
% mark size=5pt, 
thick,
error bars/.cd,
x dir=both,x explicit,
y dir=both,y explicit,
error bar style={solid}
]
table[x=features,y=GP_Laplace_NLPD_mean,y error=GP_Laplace_NLPD_std, restrict x to domain=20:120, unbounded coords=discard] {\datatable};

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% % deep Kernel Learning
% \addplot+ [gold, 
% mark=*,
% mark options={solid},
% % mark size=5pt, 
% thick,
% error bars/.cd,
% x dir=both,x explicit,
% y dir=both,y explicit,
% error bar style={solid}
% ]
% table[x=features,y=GP_deepKL_RBF_NLPD_mean,y error=GP_deepKL_RBF_NLPD_std, 
%     restrict x to domain=20:120,
%     restrict y to domain=-1:5,
%     % restrict y error to domain=0:4,
%     unbounded coords=discard,
%     ] {\datatable};

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% % ARD-RBF
% \addplot+ [lightblue, 
% dotted,
% mark=*,
% mark options={solid},
% % mark size=5pt, 
% thick,
% error bars/.cd,
% x dir=both,x explicit,
% y dir=both,y explicit,
% error bar style={solid}
% ]
% table[x=features,y=GP_ARD_RBF_NLPD_mean,y error=GP_ARD_RBF_NLPD_std, restrict x to domain=20:120, unbounded coords=discard] {\datatable};


% ARD-Laplace
\addplot+ [darkblue, 
dotted,
mark=*,
mark options={solid},
% mark size=5pt, 
thick,
error bars/.cd,
x dir=both,x explicit,
y dir=both,y explicit,
error bar style={solid}
]
table[x=features,y=GP_ARD_Laplace_NLPD_mean,y error=GP_ARD_Laplace_NLPD_std, restrict x to domain=20:120, unbounded coords=discard] {\datatable};


% ARD-Laplace-full
\addplot+ [purple, 
dotted,
mark=*,
mark options={solid},
% mark size=5pt, 
thick,
error bars/.cd,
x dir=both,x explicit,
y dir=both,y explicit,
error bar style={solid}
]
table[x=features,y=GP_ARD_Laplace_full_NLPD_mean,y error=GP_ARD_Laplace_full_NLPD_std, restrict x to domain=20:120, unbounded coords=discard] {\datatable};

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% RFM full
\addplot+ [black, 
mark=*,
mark options={solid},
% mark size=5pt,
thick,
error bars/.cd,
x dir=both,x explicit,
y dir=both,y explicit,
error bar style={solid}
]
table[x=features,y=GP_RFM_Laplace_full_NLPD_mean,y error=GP_RFM_Laplace_full_NLPD_std, restrict x to domain=20:120, unbounded coords=discard] {\datatable}; 


% RFM full
\addplot+ [blackgray, 
mark=*,
mark options={solid},
% mark size=5pt,
thick,
error bars/.cd,
x dir=both,x explicit,
y dir=both,y explicit,
error bar style={solid}
]
table[x=features,y=GP_RFM_Laplace_diag_NLPD_mean,y error=GP_RFM_Laplace_diag_NLPD_std, restrict x to domain=20:120, unbounded coords=discard] {\datatable}; 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% NG-boost
\addplot+ [orange,
dashed,
mark=*,
mark options={solid},
% mark size=5pt,
thick,
error bars/.cd,
x dir=both,x explicit,
y dir=both,y explicit,
error bar style={solid}
]
table[x=features,y=NG_Boost_NLPD_mean,y error=NG_Boost_NLPD_std, restrict x to domain=20:120, unbounded coords=discard] {\datatable};

% Cat-Boost Ensemble
\addplot+ [red, 
dashed,
mark=*,
mark options={solid},
% mark size=5pt, 
thick,
error bars/.cd,
x dir=both,x explicit,
y dir=both,y explicit,
error bar style={solid}
]
table[x=features,y=Cat_Boost_Ensemble_NLPD_mean,y error=Cat_Boost_Ensemble_NLPD_std, restrict x to domain=20:120, unbounded coords=discard] {\datatable};



\legend{
    % {GP-RBF}, 
    {GP-Laplace}, 
    % {deep Kernel Learning}, 
    % {GP-ARD-RBF},
    {GP-ARD-Laplace},
    {GP-ARD-Laplace-full},
    {\textbf{GP-RFM-Laplace}},
    {\textbf{GP-RFM-diag}},
    {NGBoost},
    {CatBoost Ensemble}
}

\end{axis}
\end{tikzpicture}