Skip to content

Commit c7ebfa0

Browse files
authored
Merge pull request #129 from SFI-Visual-Intelligence/mag-branch
Fixed some unintended headers
2 parents 36ac636 + a50c472 commit c7ebfa0

File tree

3 files changed

+29
-7
lines changed

3 files changed

+29
-7
lines changed

CollaborativeCoding/load_metric.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class MetricWrapper(nn.Module):
2929
Methods
3030
-------
3131
__call__(y_true, y_pred)
32-
Passes the true and predicted labels to the metric functions.
32+
Passes the true and predicted logits to the metric functions.
3333
getmetrics(str_prefix: str = None)
3434
Retrieves the dictionary of computed metrics, optionally all keys can be prefixed with a string.
3535
resetmetric()
@@ -40,10 +40,13 @@ class MetricWrapper(nn.Module):
4040
>>> from CollaborativeCoding import MetricWrapperProposed
4141
>>> metrics = MetricWrapperProposed(2, "entropy", "f1", "precision")
4242
>>> y_true = [0, 1, 0, 1]
43-
>>> y_pred = [0, 1, 1, 0]
43+
>>> y_pred = [[0.8, -1.9],
44+
[0.1, 9.0],
45+
[-1.9, -0.1],
46+
[1.9, 1.8]]
4447
>>> metrics(y_true, y_pred)
4548
>>> metrics.getmetrics()
46-
{'entropy': 0.6931471805599453, 'f1': 0.5, 'precision': 0.5}
49+
{'entropy': 0.3292665, 'f1': 0.5, 'precision': 0.5}
4750
>>> metrics.resetmetric()
4851
>>> metrics.getmetrics()
4952
{'entropy': [], 'f1': [], 'precision': []}

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,22 @@ The table below presents the detailed results, showcasing the model's performanc
120120
| Validation | 1.019 | 0.995 | 0.680 | 0.680 | 0.680 | 0.680 |
121121
| Test | 1.196 | 0.985 | 0.634 | 0.634 | 0.634 | 0.634 |
122122

123+
## Citing
124+
Please consider citing this repository if you end up using it for your work.
125+
Several citation methods can be found under the "About" section.
126+
For BibTeX citation please use
127+
```
128+
@software{Thrun_Collaborative_Coding_Exam_2025,
129+
author = {Thrun, Solveig and Salomonsen, Christian and Størdal, Magnus and Zavadil, Jan and Mylius-Kroken, Johan},
130+
month = feb,
131+
title = {{Collaborative Coding Exam}},
132+
url = {https://github.com/SFI-Visual-Intelligence/Collaborative-Coding-Exam},
133+
version = {1.1.0},
134+
year = {2025}
135+
}
136+
```
137+
138+
For APA please use
139+
```
140+
Thrun, S., Salomonsen, C., Størdal, M., Zavadil, J., & Mylius-Kroken, J. (2025). Collaborative Coding Exam (Version 1.1.0) [Computer software]. https://github.com/SFI-Visual-Intelligence/Collaborative-Coding-Exam
141+
```

doc/Magnus_page.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ It should be noted that a lot of our decisions came from a top-down perspective.
6767
All in all, we've made sure you don't really need to interact with the code outside setting up the correct arguments for the run, which is great for consistency.
6868

6969

70-
# Challenges
71-
## Running someone elses code
70+
## Challenges
71+
### Running someone elses code
7272
This section answers the question on what I found easy / difficult running another persons code.
7373

7474
I found it quite easy to run others code. We had quite good tests, and once every test passed, I only had one error with the F1 score not handeling an unexpected edgecase. To fix this I raised an issue, and it was fixed shortly after.
@@ -77,13 +77,13 @@ One thing I did find a bit difficult was when people would change integral parts
7777

7878
The issues mentioned above also lead to a week or so where there was always a test failing, and the person whos' code was failing did not have time to work on it for a few days.
7979

80-
## Someone running my code
80+
### Someone running my code
8181
This section answers the question on what I found easy / difficult having someone run my code.
8282

8383
I did not experience that anyone had issues with my code. After I fixed all issues and tests related to my code, it seems to have run fine, and no issues have been raised to my awareness about this.
8484

8585

86-
# Tools
86+
## Tools
8787
This section answers the question of which tools from the course I used during the home-exam.
8888

8989
For this exam I used quite a few tools from the course.

0 commit comments

Comments
 (0)