Skip to content

Commit

Permalink
Fix numbering
Browse files Browse the repository at this point in the history
  • Loading branch information
pcafrica committed Feb 18, 2025
1 parent 391d6cc commit fde53c5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions exercises/2/2.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ Create a new branch titled `knn_classifier` from the `main branch`. This is the
```
---
2. **Set up the tests**:
- Inside `tests/test.py` file implement functions called `test_distance`, `majority_vote`. The `test_distance` function should test the [distance properties](https://en.wikipedia.org/wiki/Euclidean_distance#Properties), while `majority_vote` should test that the algorithm implemented is correct (for example given `[1, 0, 0, 0]` the algorithm should return `0`).
- Inside `tests/test.py` check the constructor of `kNN` (valid types).
- Inside `tests/test.py` file implement functions called `test_distance`, `majority_vote`. The `test_distance` function should test the [distance properties](https://en.wikipedia.org/wiki/Euclidean_distance#Properties), while `majority_vote` should test that the algorithm implemented is correct (for example given `[1, 0, 0, 0]` the algorithm should return `0`).
- Inside `tests/test.py` check the constructor of `kNN` (valid types).

2. **Set up experiments**:
- Inside `src/utils.py` add the following function use to read `yaml` files:
3. **Set up experiments**:
- Inside `src/utils.py` add the following function use to read `yaml` files:
```python
def read_config(file):
filepath = os.path.abspath(f'{file}.yaml')
Expand All @@ -92,7 +92,7 @@ Create a new branch titled `knn_classifier` from the `main branch`. This is the
```
---

- Inside `shell/submit.sh` file write the following line of code, which downloads the [Ionosphere](https://archive.ics.uci.edu/dataset/52/ionosphere) dataset and put it a directory called `./data`. Explore the dataset and in `src/utils.py` create a function named `read_file` which reads the dataset file and returns the features and labels as separate lists.
- Inside `shell/submit.sh` file write the following line of code, which downloads the [Ionosphere](https://archive.ics.uci.edu/dataset/52/ionosphere) dataset and put it a directory called `./data`. Explore the dataset and in `src/utils.py` create a function named `read_file` which reads the dataset file and returns the features and labels as separate lists.
```bash
URL="https://archive.ics.uci.edu/static/public/52/ionosphere.zip"
DEST_DIR="data"
Expand Down

0 comments on commit fde53c5

Please sign in to comment.