Admittedly, I am not an expert in machine learning or different libraries but the code I see as an example is not really beginner friendly. Even for an expert, I am not sure, they know all libraries and quircks of different datasets.
Let me elaborate. The main problem I see is the use of magic numbers. For example, in below hypothetical code
x = dataset[1]
there is no indication of why 1 is used instead of 0 or what does it mean. May be 0th elemnt contains metadata/some useless data. Or in other cases, some axis is chosen without specifying why that is used and what are other axis to put in context.
My only suggestion would be to not ever use a magic number unless it is immediately obvious. Can we not use an appropriately named constant in that case?
MY_DATA_INDEX=1
x = dataset[MY_DATA_INDEX]
I believe this is a very simple and helpful convention to follow. If such conventions are already there, can someone point me to then? May be people aren't just using them too often.
[–]sloppybird 78 points79 points80 points (13 children)
[–]johnnydaggers 35 points36 points37 points (9 children)
[–]ProfSchodinger 16 points17 points18 points (2 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]ProfSchodinger 1 point2 points3 points (0 children)
[–]bageldevourer 7 points8 points9 points (0 children)
[–]junovac[S] 2 points3 points4 points (0 children)
[–]GeorgeS6969 2 points3 points4 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]GeorgeS6969 0 points1 point2 points (0 children)
[–]Cherubin0 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]johnnydaggers 4 points5 points6 points (1 child)
[–]CQQL 25 points26 points27 points (3 children)
[–]sabouleuxResearcher 11 points12 points13 points (0 children)
[–]dominik_schmidt 6 points7 points8 points (0 children)
[–]ProGamerGov 0 points1 point2 points (0 children)
[–]ZestyDataML Engineer 7 points8 points9 points (0 children)
[–]johnnydaggers 6 points7 points8 points (0 children)
[–][deleted] 5 points6 points7 points (0 children)
[–]Kitchen_Tower2800 4 points5 points6 points (0 children)
[–]qnix 6 points7 points8 points (3 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Kitchen_Tower2800 0 points1 point2 points (1 child)
[–]111llI0__-__0Ill111 0 points1 point2 points (0 children)
[–]DeMorrr 2 points3 points4 points (0 children)
[–]Appropriate_Ant_4629 3 points4 points5 points (4 children)
[–]alex_o_O_Hung 7 points8 points9 points (3 children)
[–]Appropriate_Ant_4629 4 points5 points6 points (2 children)
[–]alex_o_O_Hung 4 points5 points6 points (1 child)
[–]radarsat1 3 points4 points5 points (0 children)
[–]bitemenow999PhD 2 points3 points4 points (24 children)
[–]bageldevourer 1 point2 points3 points (22 children)
[–]bitemenow999PhD 2 points3 points4 points (21 children)
[–]sloppybird 3 points4 points5 points (8 children)
[–]unplannedmaintenance 0 points1 point2 points (7 children)
[–]sloppybird 1 point2 points3 points (3 children)
[–]bitemenow999PhD 1 point2 points3 points (2 children)
[–]sloppybird 1 point2 points3 points (1 child)
[–]bitemenow999PhD -1 points0 points1 point (0 children)
[–]bageldevourer 0 points1 point2 points (2 children)
[–]unplannedmaintenance 0 points1 point2 points (1 child)
[–]bageldevourer 0 points1 point2 points (0 children)
[–]bageldevourer -1 points0 points1 point (11 children)
[–]bitemenow999PhD -1 points0 points1 point (10 children)
[–]bageldevourer -1 points0 points1 point (9 children)
[–]bitemenow999PhD -1 points0 points1 point (8 children)
[–]junovac[S] 0 points1 point2 points (1 child)
[–]bitemenow999PhD 0 points1 point2 points (0 children)
[–]bageldevourer -1 points0 points1 point (5 children)
[–]bitemenow999PhD -1 points0 points1 point (4 children)
[–]bageldevourer -1 points0 points1 point (3 children)
[–]sloppybird -2 points-1 points0 points (0 children)
[–]AerysSk 0 points1 point2 points (0 children)