marjoleinF / IOPS

0 stars 0 forks source link

Suggestions #1

Open jorvlan opened 1 year ago

jorvlan commented 1 year ago

Hi Marjolein,

thanks again for the great lecture about machine learning & psychometrics.

I've gone through the provided tutorials, and noticed a few things that I would like to provide as a suggestion/comment/question below (feel free to ignore!)

  1. Initially, I was a little confused by the naming of the pre function which equals the package name pre. Not a huge thing, but I wasn't sure whether assigning a similar name to a function within a package is common behavior in R?

    Schermafbeelding 2023-09-28 om 08 17 36
  2. I ran into an error when running the pre::pairplot section, since I did not have the interp package pre-installed.

    Schermafbeelding 2023-09-28 om 08 40 10
  3. I guess this is just a change of naming during the tutorial, but initially it starts out with depression.ens after which object assigning turns into cv.depression (instead of depression.cv). Is that necessary or does switching up the order not matter?

Thanks again for a great workshop!

Best, Jordy

marjoleinF commented 1 year ago

Hi Jordi,

Thanks for your comments!

  1. Same name for package and (main) function is very common in R. E.g., there's glmnet::glmnet, randomForest::randomForest, gbm::gbm, rpart::rpart, tree::tree.

  2. Good point! Package interp is not imported but only suggested by package pre, because it is only used by function pairplot and it is good practice to keep package dependencies to a minimum. But an informative warning should be thrown if pairplot is called without interp being installed, will implement this.

  3. cv.depression is the result of function cvpre, which performs 10-fold cross-validation and returns cross-validated predictions and accuracy. It is not an ensemble; depression.ens is the fitted ensemble, which can be used for prediction and interpretation, etc. The cv.depression object thus gives the (best) estimate of generalization error of depression.ens.

Hope this helps!

Best, Marjolein