Closed dominik-probst closed 2 years ago
Thanks for your short review. We had already discussed that a long one won't be possible.
In this case, however, I disagree with your three proposals, which I would like to explain briefly here (I'll stick to your numbering here):
At this point, however, also something that you have not noted, but which I myself will definitely adopt as a planned improvement in the coming semester: The assert test cases you used on your practice sheet. These will certainly help students to develop more confidence in their own implementations and are definitely something to come for this reason. However this is something for the next semester, as I want to see all my exercise sheets adapted here equally.
I strongly disagree with you.
sklearn
already follows this structure and it is easy to use. I twill not enforce an architecture style but merely a programming paradigm (object oriented vs. imperative) that is easy to follow. Introducing classes and objects with fit/pedict functions will introduce a procedure to follow. As mentioned, sklearn
already follows this paradigm. Implementing DBSCAN for instance from scratch and then compare this result by using sklearn
's implementation uses two paradigms. Introduction of this approach will not by any means shift the focus away from implementing the presented content discussed in our lectures. Additionally, it will provide and prepare our notebooks later for any automatic tests if we wish to provide and use this proposed API.k
. In this JupyterNotebook all function calls obtain a value for this parameter k
. This parameter, however, is something that should by no means change during the course of training. Therefore, it is an object variable. Yet, in all function calls this parameter is individually chosen - all set to the number 2, but no variable is introduced at the beginning of this exercise notebook.In summary, I want to emphasise that the last point is out of scope for this semester due to time constraints and I did not, by any means, want or wanted to make the impression that implementing this proposal for this semester (for next week's exercise to be exact) is obligatory. It is merely something to incorporate next semester.
The review shows that you don't share the same opinion. And that's completely okay.
Regarding point 1: If students do not read the preamble, they may also skim over the task description. We cannot avoid that for all students. Also, when we mention the nature in our lecture, not all students will join our lecture sessions, not all students will listen equally (partially because it's at the end of the lecture and attention may wear thin), some may even forget it until they download our exercises or until they join our exercise sessions, and others may forget it altogether. We cannot account for every single event that may or may not occur.
Additionally, scrolling through the notebook to find the tasks they should solve (Option 1: Implement some algorithms on their own vs. Option 2: Implementing said algorithm in a guided manner, and then there's also an "option 3" which only displays using sklearn
's function) may also contribute to missing some tasks, just like the one student you are referring to even though in this case a whole separate notebook has been overlooked. This is indeed unfortunate, yet no hard setback as this concerned the very first exercise week which solely covered an introduction to Python and pandas. The student had still the opportunity to catch up on that exercise if he/she requires or seeks to do so. We have no bonus points whatsoever employed this semester and, in the event of introducing such a bonus-system in the future, I highly doubt we will not employ bonus points on this very exercise.
To sum up, I see the following advantages from a student's perspective:
zip
-file to download, it contains everything to work on. Except from this one incident at the begining, where student's have not been familiar with the structure, they know that every JupyterNotebook in this zip
-file contains tasks to work on.Regarding point 3: I don't think that we have such a distinct didactic opinion. We both want the students to focus on and understand the algorithms and not simply learn them blindly by heart.
My take here is that introducing an object-oriented programming paradigm and thus, inherently providing an API that follows a fit/predict structure, comes natural when the majority of algorithms we discuss follows exactly this procedure. Algorithms that do not use a predict
-function can simply leave out the implementation thereof.
The exercise notebook of A Priori for instance, already introduces and uses objects to model data structures for an Itemset
, and ItemsetList
. Converting and moving these variables together with functions like generate_candidates
and scan_candidates
to an APriori class such as to replace the wrapper function a_priori
comes more natural as all necessary and used functions and propagated variables are in one place, namely in one A Priori object that has been trained on a specific dataset. I believe it is possible to reflect the same guided walk-through that you used in your notebooks by introduing a class with a fit/predict API (such as in the A Priori example: first implement prune_itemsets
, generate_candidates
, then scan_candidates
and then use these funcitons to build the fit
-function) without jeopardizing your take on focussing on the algorithm and convey exactly the details of said algorithm in our exercises. This, in my point of view, would align with your and my didactic opinion.
Converting the existing notebooks to follow this procedure is of course time-consuming, but then again creating the exercises in the first place consumed a tremendous amount of time. Converting them would in no way invalidate the initial time and effort spent, quite on the contrary. If you like, I could prepare a version of your exercise that uses a class fit/predict approach to evaluate how far these two exercise versions would then diverge. Likewise, I offer my time in converting them so that you are relieved from at least some of the workload ahead. Additionally, I highly appreciate the continuous effort in making this lecture happening and even extend it with an exercise.
Wrap Up We already agreed on not changing this specific exercise for this current semester. Therefore, as agreed I will
Closes #40