Code review for v 1.0.0
pbiecek opened this issue · 3 comments
What to check:
- is documentation sufficient to understand function's parameters
- is the description in DESCRIPTION up to date and meaningful
- are examples easy to understand and follow
- are descriptions in vignettes easy to understand and follow
- is the README.md file easy to understand, consistent with other descriptions
- is the R code easy to understand and follow
- R code should be modular (long functions are bad)
- are function names and variable names consistent
Comments for Thursday
-
Link to D3 example in README doesn't work -
it would be good to change names of files in R folder, they should be consistent wit names of functions inside them -
unmeaningful name of the variable -tmp
. How aboutpath
or something similar? I also think that this code should be a separate function, e.g.make_path()
orcreate_path()
Lines 113 to 127 in 1096fa4
The same for
iBreakDown/R/break_interactions.R
Lines 157 to 169 in 1096fa4
- how about moving parameter interaction_preference
after label
? The order of parameters common with function local_attributions
would overlap.
iBreakDown/R/break_interactions.R
Lines 88 to 93 in 1096fa4
Lines 85 to 89 in 1096fa4
-
codes that are repeated in
local_attributions
andlocal_interactions
. It would be good to make code DRY.
Lines 90 to 98 in 1096fa4
iBreakDown/R/break_interactions.R
Lines 94 to 101 in 1096fa4
-
unmeaningful variable name - tmp, maybe differences_1d or differences_summary?
iBreakDown/R/break_interactions.R
Lines 128 to 135 in 1096fa4
The same for:
iBreakDown/R/break_interactions.R
Lines 149 to 155 in 1096fa4
-
these codes differ a little, would it be possible to make them identical and make a separate function?
Lines 168 to 182 in 1096fa4
iBreakDown/R/break_interactions.R
Lines 206 to 220 in 1096fa4
How about adding a second classdata.frame
forbreak_down
objects?
- names of parameters in plotD3()
and plot()
are inconsistent
Lines 55 to 59 in 1096fa4
Lines 83 to 85 in 1096fa4
-
I think that data manipulations inplotD3()
andplot()
should be separate functions. -
now we can use a ggplot2 theme from DALEX, This file is unnecessary:
https://github.com/ModelOriented/iBreakDown/blob/master/R/theme_drwhy.R
Most of these issues get fixed.
Thanks.
Code is refactored and simplified, but the part for interactions is not a production quality code.
Once the methodology behind interactions will be established we need to rewrite local_interactions