You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 9, 2023. It is now read-only.
Copy file name to clipboardexpand all lines: masterthesis_tex/sections/case_study_functions.tex
+15-7
Original file line number
Diff line number
Diff line change
@@ -3,36 +3,44 @@ \section{Case Study functions}
3
3
\label{sec:case_study_functions}
4
4
5
5
\textbf{class\_num}
6
-
This argument \\\\
6
+
This argument gets the key value from the labels which is an integer. \\\\
7
7
\textbf{train\_number}
8
-
This argument \\\\
8
+
This argument gets the number of images from a labeled folder. \\\\
9
9
\textbf{train\_path}
10
-
This argument \\\\
10
+
This argument gets the path where the local training data is stored. \\\\
11
11
\textbf{data\_dir}
12
-
This argument \\\\
12
+
This argument gets the path where all local images are stored. \\\\
13
13
\textbf{image\_data}
14
-
This argument \\\\
14
+
This argument gets an array with all images from a label. \\\\
15
15
\textbf{image\_labels}
16
-
This argument \\\\
16
+
This argument gets the label which belongs to the corresponding images. \\\\
17
17
18
18
\begin{lstlisting}
19
19
dataset_visualization(class_num, train_number)
20
20
\end{lstlisting}
21
21
22
-
\noindentIn this function the number of images are visualized and sorted from the lowest to the highest number of images per label.
22
+
\noindentWith this function, the number of images are visualized and sorted from the lowest to the highest number of images per label.
23
23
24
24
\begin{lstlisting}
25
25
read_training_data(train_path, data_dir)
26
26
\end{lstlisting}
27
27
28
+
\noindent This function reads in the training data, calls the \textit{dataset\_visualization()} function and resize the images to $30x30$ pixels. The function is called by the \textit{preprocessing()} function.
\noindent After calling the \textit{read\_training\_data()} function, this function assign the \textbf{image\_date} and \textbf{image\_labels} arguments to shuffle the training data. Then the training data splits into training and validation data. The shape of the images must be reshaped for the SVM.
\noindent After calling the \textit{preprocessing()} function, this function calls a pipeline function with the \textit{SVC()} class and then fits the classifier.
\noindent After calling the \textit{model\_training()} function, this function reads in the test data, resizes the images to $30x30$ pixels and then reshape the images. The last step is the prediction with the test data.
0 commit comments