4. In this tutorial you will use files that should not be pushed to the remote repository. To ignore them when committing, you can put their path in a file named `.gitignore`. For simplicity, we use the [`.gitignore` file](https://github.com/github/gitignore/blob/main/Python.gitignore) recommended by GitHub for python projects.
4. In this tutorial you will use files that should not be pushed to the remote repository. To ignore them when committing, you can put their path in a file named `.gitignore`. For simplicity, we use the [`.gitignore` file](https://github.com/github/gitignore/blob/main/Python.gitignore) recommended by GitHub for Python projects.
## Prepare the CIFAR dataset
## Prepare the CIFAR dataset
...
@@ -73,8 +73,8 @@ This database can be obtained at the address https://www.cs.toronto.edu/~kriz/ci
...
@@ -73,8 +73,8 @@ This database can be obtained at the address https://www.cs.toronto.edu/~kriz/ci
-`labels_train` the training labels, and
-`labels_train` the training labels, and
-`k` the number of of neighbors.
-`k` the number of of neighbors.
This function must return the predicted labels for the elements of `data_train`.
This function must return the predicted labels for the elements of `data_train`.
**Note:** if the memory occupation is too important, you can use several batches for the calculation of the distance matrix (loop on sub-batches of test data).
**Note:** if the memory occupation is too important, you can use several batches for the calculation of the distance matrix (loop on sub-batches of test data).
{: .note}
3. Write the function `evaluate_knn` taking as parameters:
3. Write the function `evaluate_knn` taking as parameters: