Skip to content
Snippets Groups Projects
Commit 6d920fd0 authored by MSI\alber's avatar MSI\alber
Browse files

Final commit

parent 93656919
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ The two models are tested on the image database CIFAR-10 which consists of 60 00 ...@@ -22,7 +22,7 @@ The two models are tested on the image database CIFAR-10 which consists of 60 00
- `read_cifar(path)`: takes the path of the directory containing the six batches and returns a matrix `data` and a vector `labels`. - `read_cifar(path)`: takes the path of the directory containing the six batches and returns a matrix `data` and a vector `labels`.
- `split_dataset(data, labels, split_factor)`: randomly splits the dataset into a training set and a test set with a specified split factor. - `split_dataset(data, labels, split_factor)`: randomly splits the dataset into a training set and a test set with a specified split factor.
m
### K-Nearest Neighbors ### K-Nearest Neighbors
3. The Python file named `knn.py` is composed of: 3. The Python file named `knn.py` is composed of:
...@@ -55,9 +55,18 @@ The two models are tested on the image database CIFAR-10 which consists of 60 00 ...@@ -55,9 +55,18 @@ The two models are tested on the image database CIFAR-10 which consists of 60 00
5. In the `results` folder there are three plot images: 5. In the `results` folder there are three plot images:
- `knn.png`: refers to the knn algorithm, it represents the plot of the accuracy evolution along increasing value of 'k' (from 1 to 20) - `knn.png`: refers to the knn algorithm, it represents the plot of the accuracy evolution along increasing value of 'k' (from 1 to 20)
<div style="text-align:center;">
<img src="results/knn.png" alt="knn" width="300" height="200">
</div>
- `mlp.png`: refers to the MLP neural network, it represents the plot of the training accuracies evolution along 100 epochs - `mlp.png`: refers to the MLP neural network, it represents the plot of the training accuracies evolution along 100 epochs
- `loss.png`: refers to the MLP neural network, it represents the plot of the loss evolution along 100 epochs (further proof that the network works) - `loss.png`: refers to the MLP neural network, it represents the plot of the loss evolution along 100 epochs (further proof that the network works)
<div style="text-align:center;">
<img src="results/mlp.png" alt="mlp" width="300" height="200">
<img src="results/loss.png" alt="loss" width="300" height="200">
</div>
## Usage ## Usage
1. Clone the repository. 1. Clone the repository.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment