You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Object oriented is for single element operations in its best state because of the dictionary (which contains as key a given date) it as fast and simple as possible.
821
+
For the calculation of the mean for every field for a given month, week, year is already quite sophisticated, because I'm saving the data in an object with the given date and month. So accessing the iterating the data, for example for a given year, it can be done easily.
822
+
The only difference between the Object oriented approach and the self written data oriented is only that one uses objects and the other one is based on matrixes and that instead of using a dictionary I'm using a list in Task 2. So to keep the data consistent and avoid redundancy in the dataset I implemented an additional list which contains all the indices.
823
+
824
+
The only way to improve both the tasks is to pre-calculate the week and store it as an additional field in an object or as an additional column in a matrix. But this will affect the speed of the loading process. That is the reason why i did not implemented it.
825
+
Another potential, but sadly impossible way to improve the data oriented approach would be if it could be possible to slice arrays like with numpy. Sadly, that's not possible so the only efficient way is to iterate over the list.
0 commit comments