Homework3 Submit
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 15 KiB |
BIN
hw3/report/img/train/1/accu.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
hw3/report/img/train/1/loss.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
hw3/report/img/train/1/sv.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
hw3/report/img/train/1/test.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
hw3/report/img/train/1/val.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
hw3/report/img/train/1e-6/accu.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
hw3/report/img/train/1e-6/loss.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
hw3/report/img/train/1e-6/sv.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
hw3/report/img/train/1e-6/test.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
hw3/report/img/train/1e-6/val.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
hw3/report/img/train/default/loss.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
hw3/report/img/train/default/sv.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
hw3/report/img/train/default/test.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
hw3/report/img/train/default/train_accu.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
hw3/report/img/train/default/val.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
@@ -12,6 +12,42 @@
|
||||
\usepackage{booktabs} % toprule
|
||||
\usepackage[mathcal]{eucal}
|
||||
\usepackage[thehwcnt = 3]{iidef}
|
||||
\usepackage{listings}
|
||||
\usepackage{fontspec}
|
||||
\usepackage{xcolor}
|
||||
\usepackage{float}
|
||||
\usepackage{siunitx}
|
||||
|
||||
\newfontfamily\codefont[Ligatures=ResetAll]{Fira Code}[Contextuals={Alternate}]
|
||||
\newfontfamily\cascadia{Cascadia Code}
|
||||
|
||||
\lstset{
|
||||
basicstyle = \small\codefont,
|
||||
% ---
|
||||
tabsize = 4,
|
||||
showstringspaces = false,
|
||||
numbers = left,
|
||||
numberstyle = \codefont,
|
||||
% ---
|
||||
breaklines = true,
|
||||
captionpos = t,
|
||||
% ---
|
||||
frame = l,
|
||||
flexiblecolumns,
|
||||
}
|
||||
|
||||
\lstdefinestyle{Python}{
|
||||
language = Python, % 语言选Python
|
||||
keywordstyle = \color{blue},
|
||||
keywordstyle = [2] \color{teal},
|
||||
stringstyle = \color{orange!80!black},
|
||||
commentstyle = \color{red},
|
||||
identifierstyle = \color{blue!80!white},
|
||||
}
|
||||
|
||||
\lstdefinestyle{Bash}{
|
||||
language = bash
|
||||
}
|
||||
|
||||
\thecourseinstitute{清华大学电子工程系}
|
||||
\thecoursename{\textbf{媒体与认知}}
|
||||
@@ -232,10 +268,106 @@
|
||||
\vspace{3mm}
|
||||
% 请根据是否选择自选课题的情况选择“编程作业报告”或“自选课题进度汇报”中的一项完成
|
||||
\section{编程作业报告}
|
||||
% 请在此处完成编程作业报告
|
||||
\subsection{程序验证}
|
||||
与助教给出的图片相比,我写出的程序PCA得到的结果的xy坐标都在$[-1, 1]$之间,不利于之后的分类。我将所有的PCA之后的坐标都扩大了20倍。
|
||||
|
||||
\section{自选课题进度汇报}
|
||||
% 请在此处介绍自选课题
|
||||
运行\lstinline{check.py}进行检查:
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\includegraphics[width=\linewidth]{img/check/check.png}
|
||||
\end{figure}
|
||||
|
||||
\subsection{数据预处理}
|
||||
运行
|
||||
\begin{lstlisting}[style=Bash]
|
||||
python data_preprocess.py
|
||||
\end{lstlisting}
|
||||
得到的输出为
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\begin{subfigure}[t]{.45\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/preprocess/preprocess_train.png}
|
||||
\caption{训练集preprocess结果}
|
||||
\end{subfigure}
|
||||
\hspace{0.5cm}
|
||||
\begin{subfigure}[t]{.45\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/preprocess/preprocess_val.png}
|
||||
\caption{验证集preprocess结果}
|
||||
\end{subfigure}\\[2ex]
|
||||
\begin{subfigure}[t]{.45\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/preprocess/preprocess_test.png}
|
||||
\caption{测试集preprocess结果}
|
||||
\end{subfigure}
|
||||
\end{figure}
|
||||
|
||||
\subsection{训练、验证及测试}
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\begin{subfigure}[t]{.45\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/train/default/loss.png}
|
||||
\end{subfigure}
|
||||
\hspace{0.5cm}
|
||||
\begin{subfigure}[t]{.45\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/train/default/train_accu.png}
|
||||
\end{subfigure}\\[2ex]
|
||||
\begin{subfigure}[t]{.45\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/train/default/sv.png}
|
||||
\end{subfigure}
|
||||
\hspace{0.5cm}
|
||||
\begin{subfigure}[t]{.45\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/train/default/val.png}
|
||||
\end{subfigure}\\[2ex]
|
||||
\begin{subfigure}[t]{.8\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/train/default/test.png}
|
||||
\end{subfigure}
|
||||
\end{figure}
|
||||
|
||||
\subsection{调整正则化系数}
|
||||
\subsubsection{C = \num{1e-6}}
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\begin{subfigure}[t]{.45\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/train/1e-6/loss.png}
|
||||
\end{subfigure}
|
||||
\hspace{0.5cm}
|
||||
\begin{subfigure}[t]{.45\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/train/1e-6/accu.png}
|
||||
\end{subfigure}\\[2ex]
|
||||
\begin{subfigure}[t]{.45\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/train/1e-6/sv.png}
|
||||
\end{subfigure}
|
||||
\hspace{0.5cm}
|
||||
\begin{subfigure}[t]{.45\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/train/1e-6/val.png}
|
||||
\end{subfigure}\\[2ex]
|
||||
\begin{subfigure}[t]{.8\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/train/1e-6/test.png}
|
||||
\end{subfigure}
|
||||
\end{figure}
|
||||
可以看到出现了严重的欠拟合,分类界面超出了绘图的范围。这是因为C过小,导致不能正确地分辨合适的分类界面。
|
||||
|
||||
\subsubsection{C = 1}
|
||||
\begin{figure}[H]
|
||||
\centering
|
||||
\begin{subfigure}[t]{.45\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/train/1/loss.png}
|
||||
\end{subfigure}
|
||||
\hspace{0.5cm}
|
||||
\begin{subfigure}[t]{.45\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/train/1/accu.png}
|
||||
\end{subfigure}\\[2ex]
|
||||
\begin{subfigure}[t]{.45\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/train/1/sv.png}
|
||||
\end{subfigure}
|
||||
\hspace{0.5cm}
|
||||
\begin{subfigure}[t]{.45\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/train/1/val.png}
|
||||
\end{subfigure}\\[2ex]
|
||||
\begin{subfigure}[t]{.8\linewidth}
|
||||
\includegraphics[width=\textwidth]{img/train/1/test.png}
|
||||
\end{subfigure}
|
||||
\end{figure}
|
||||
发生了过拟合,直线被交界面的点限制,斜率不是最优。
|
||||
|
||||
\end{document}
|
||||
|
||||
|
||||