我有这个
我希望它们并排显示在一张幻灯片上。我尝试使用 minipage 来查看是否成功。这是我的整个 latex 代码:
\documentclass{beamer}
\usetheme{Warsaw}
\usepackage{algorithm,algpseudocode}
\usepackage{multicol}
% %\usepackage[labelfont={color=bf}]{caption}
% % Changes the Font size on a particular slide
\newcommand\Fontvi{\fontsize{8}{8.2}\selectfont}
\setbeamersize{text margin left=1.0cm,text margin right=1.0cm}
\title{XGBoost: Using a Tree Boosting Algorithm to Predict the Probability of Default }
\author{Morgan Weiss}
\institute{Aspen Capital}
\date{\today}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}
\frame{Outline}
\tableofcontents
\end{frame}
\section{Section 1}
\subsection{Objectives}
\begin{frame}
\frametitle{Objectives}
\begin{itemize}
\item Short-term Objective: Create a more accurate model to predict the probability of default.
\item Long-term Objective: To improve the accuracy of cash-flow projections.
\end{itemize}
\begin{figure}
\includegraphics[width=0.8\textwidth]{1.png}
\end{figure}
\end{frame}
\subsection{Methodologies}
\begin{frame}
\frametitle{Methodologies}
\begin{itemize}
\item Model:
\begin{itemize}
\item XGBoost
\begin{enumerate}
\item Additive tree model: add new trees that complement the already built ones.
\item Reponse is the optimal linear combination of all decision trees.
\end{enumerate}
\end{itemize}
\end{itemize}
\begin{figure}
\includegraphics[width=0.8\textwidth]{2.png}
\end{figure}
\end{frame}
\subsection{Data and Features Used}
\begin{frame}[shrink=11]
\frametitle{Data and Features Used}
\begin{itemize}
\item Number of loans in data set: $13,216$ (includes both active and inactive).
\item Features ($x$ variables):
\begin{multicols}{2}
\begin{itemize}
\item Demographic:
\begin{itemize}
\item Age of borrower as of service transfer date.
\item Fico score (current).
\item Education (Melissa database).
\item Marital status (Melissa database).
\item Presence of children.
\item Household size.
\item Gender (Melissa database).
\item Household income (Melissa database).
\item Length of residence.
\end{itemize}
\columnbreak
\item Property specific:
\begin{itemize}
\item State.
\item Distance to nearest metropolitan city.
\item Year built.
\item Square footage of property.
\item Lotsize (in sqft).
\end{itemize}
\item Loan specific:
\begin{itemize}
\item Current UPB.
\item Purchased UPB.
\item Purchased value.
\item Purchased LTV.
\item Original interest rate.
\item Bidding status.
\end{itemize}
\end{itemize}
\end{multicols}
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Predictor: Default flag, how is it calculated?}
\begin{itemize}
\item Default flag ($\hat{y}$)
\begin{itemize}
\item Calculated from
\begin{itemize}
\item Loan status.
\item Days delinquent.
\item Bidding status (old and new).
\end{itemize}
\end{itemize}
\end{itemize}
\end{frame}
\section{Section 2}
\subsection{Model Output}
\begin{frame}
\frametitle{Model Output}
\begin{table}[ht]
\scalebox{0.6}{
\begin{tabular}{|c|c|c|}
\hline
& \textbf{Training Set} & \textbf{Testing Set} \\ \hline
\textbf{Accuracy} & 0.780079 & 0.7545 \\ \hline
\textbf{AUC Score} & 0.873782 & 0.822150 \\ \hline
\end{tabular}
}
\end{table}
\begin{figure}
\includegraphics[width=0.43\textwidth]{3.png}
\end{figure}
\end{frame}
\begin{frame}
\frametitle{Model Output (cont.)}
\begin{table}[ht]
\scalebox{0.75}{
\begin{tabular}{|c|c|}
\hline
& \textbf{Testing Set} \\ \hline
\textbf{Error Rate} & 0.245461 \\ \hline
\textbf{Sensitivity} & 0.695352 \\ \hline
\textbf{Specificity} & 0.695352 \\ \hline
\textbf{False Positive Rate} & 0.228793 \\ \hline
\end{tabular}
}
\end{table}
\begin{figure}
\includegraphics[width=0.5\textwidth]{4.png}
\end{figure}
\end{frame}
\section{Conclusion}
\begin{frame}
\frametitle{Summary}
\end{frame}
\end{document}
只是为了澄清一下,我希望表格和图片并排放在一张幻灯片上。
答案1
你可以用columns
这个。我不知道第 1 节和摘要的所有这些幻灯片是否也要更改。我也没有你的数字1.png
等等。
\documentclass{beamer}
\usetheme{Warsaw}
%\usepackage{algorithm,algpseudocode}
%\usepackage{multicol}
% %\usepackage[labelfont={color=bf}]{caption}
% % Changes the Font size on a particular slide
\newcommand\Fontvi{\fontsize{8}{8.2}\selectfont}
\setbeamersize{text margin left=1.0cm,text margin right=1.0cm}
\title{XGBoost: Using a Tree Boosting Algorithm to Predict the Probability of Default }
\author{Morgan Weiss}
\institute{Aspen Capital}
\date{\today}
\begin{document}
% \begin{frame}
% \titlepage
% \end{frame}
%
% \begin{frame}
% \frame{Outline}
% \tableofcontents
% \end{frame}
% \section{Section 1}
%
% \subsection{Objectives}
% \begin{frame}
% \frametitle{Objectives}
% \begin{itemize}
% \item Short-term Objective: Create a more accurate model to predict the probability of default.
% \item Long-term Objective: To improve the accuracy of cash-flow projections.
% \end{itemize}
% \begin{figure}
% \includegraphics[width=0.8\textwidth]{example-image-a}
% \end{figure}
% \end{frame}
%
% \subsection{Methodologies}
% \begin{frame}
% \frametitle{Methodologies}
% \begin{itemize}
% \item Model:
% \begin{itemize}
% \item XGBoost
% \begin{enumerate}
% \item Additive tree model: add new trees that complement the already built ones.
% \item Reponse is the optimal linear combination of all decision trees.
% \end{enumerate}
% \end{itemize}
% \end{itemize}
% \begin{figure}
% \includegraphics[width=0.8\textwidth]{example-image-b}
% \end{figure}
% \end{frame}
%
% \subsection{Data and Features Used}
% \begin{frame}[shrink=11]
% \frametitle{Data and Features Used}
% \begin{itemize}
% \item Number of loans in data set: $13,216$ (includes both active and inactive).
% \item Features ($x$ variables):
% \begin{multicols}{2}
% \begin{itemize}
% \item Demographic:
% \begin{itemize}
% \item Age of borrower as of service transfer date.
% \item Fico score (current).
% \item Education (Melissa database).
% \item Marital status (Melissa database).
% \item Presence of children.
% \item Household size.
% \item Gender (Melissa database).
% \item Household income (Melissa database).
% \item Length of residence.
% \end{itemize}
% \columnbreak
% \item Property specific:
% \begin{itemize}
% \item State.
% \item Distance to nearest metropolitan city.
% \item Year built.
% \item Square footage of property.
% \item Lotsize (in sqft).
% \end{itemize}
% \item Loan specific:
% \begin{itemize}
% \item Current UPB.
% \item Purchased UPB.
% \item Purchased value.
% \item Purchased LTV.
% \item Original interest rate.
% \item Bidding status.
% \end{itemize}
% \end{itemize}
% \end{multicols}
% \end{itemize}
% \end{frame}
%
% \begin{frame}
% \frametitle{Predictor: Default flag, how is it calculated?}
% \begin{itemize}
% \item Default flag ($\hat{y}$)
% \begin{itemize}
% \item Calculated from
% \begin{itemize}
% \item Loan status.
% \item Days delinquent.
% \item Bidding status (old and new).
% \end{itemize}
% \end{itemize}
% \end{itemize}
% \end{frame}
%
%
%
\section{Section 2}
\subsection{Model Output}
\begin{frame}
\frametitle{Model Output}
\begin{columns}[t]
\begin{column}{0.3\textwidth}
\begin{table}[ht]
\scalebox{0.6}{
\begin{tabular}{|c|c|c|}
\hline
& \textbf{Training Set} & \textbf{Testing Set} \\ \hline
\textbf{Accuracy} & 0.780079 & 0.7545 \\ \hline
\textbf{AUC Score} & 0.873782 & 0.822150 \\ \hline
\end{tabular}
}
\end{table}
\end{column}
\begin{column}{0.65\textwidth}
\begin{figure}
\includegraphics[width=0.8\linewidth]{example-image-c}
\end{figure}
\end{column}
\end{columns}
\end{frame}
\begin{frame}
\frametitle{Model Output (cont.)}
\begin{columns}[t]
\begin{column}{0.3\textwidth}
\begin{table}[ht]
\scalebox{0.75}{
\begin{tabular}{|c|c|}
\hline
& \textbf{Testing Set} \\ \hline
\textbf{Error Rate} & 0.245461 \\ \hline
\textbf{Sensitivity} & 0.695352 \\ \hline
\textbf{Specificity} & 0.695352 \\ \hline
\textbf{False Positive Rate} & 0.228793 \\ \hline
\end{tabular}
}
\end{table}
\end{column}
\begin{column}{0.65\textwidth}
\begin{figure}
\includegraphics[width=0.85\linewidth]{example-image-duck}
\end{figure}
\end{column}
\end{columns}
\end{frame}
%
%
% \section{Conclusion}
% \begin{frame}
% \frametitle{Summary}
%
% \end{frame}
\end{document}
至于您的评论,您也可以使用简单的表格。
\documentclass{beamer}
\usetheme{Warsaw}
\newcommand\Fontvi{\fontsize{8}{8.2}\selectfont}
\setbeamersize{text margin left=1.0cm,text margin right=1.0cm}
\title{XGBoost: Using a Tree Boosting Algorithm to Predict the Probability of Default }
\author{Morgan Weiss}
\institute{Aspen Capital}
\date{\today}
\begin{document}
\section{Section 2}
\subsection{Model Output}
\begin{frame}
\frametitle{Model Output}
\begin{tabular}{cc}
\scalebox{0.6}{
\begin{tabular}{|c|c|c|}
\hline
& \textbf{Training Set} & \textbf{Testing Set} \\ \hline
\textbf{Accuracy} & 0.780079 & 0.7545 \\ \hline
\textbf{AUC Score} & 0.873782 & 0.822150 \\ \hline
\end{tabular}
}
& $\vcenter{\hbox{\includegraphics[width=0.4\textwidth]{example-image-c}}}$
\\[5em]
\pause
\scalebox{0.75}{
\begin{tabular}{|c|c|}
\hline
& \textbf{Testing Set} \\ \hline
\textbf{Error Rate} & 0.245461 \\ \hline
\textbf{Sensitivity} & 0.695352 \\ \hline
\textbf{Specificity} & 0.695352 \\ \hline
\textbf{False Positive Rate} & 0.228793 \\ \hline
\end{tabular}
}
&
$\vcenter{\hbox{\includegraphics[width=0.4\textwidth]{example-image-duck}}}$
\end{tabular}
\end{frame}
\end{document}