This is an interim progress report, so there is no need to do a code review. I would ask you to review the entire code again after the cleanup.
I separated estimate_mu as you suggested and created a new R notebook 1_2estimate_mu.R, although it is still messy. Also, following your advice, I did not save the results directly to data_all. Instead, I saved the output to data_test for each fold and merged them at the end.
I was able to modify the Trycatch() part to be understandable by using if...else....
As for the data_all and data_split part, the following suggested code did not work for some reason. I'm still trying to find out the reason...
@sou412 @carolyyzz
This is an interim progress report, so there is no need to do a code review. I would ask you to review the entire code again after the cleanup.
I separated
estimate_mu
as you suggested and created a new R notebook1_2estimate_mu.R
, although it is still messy. Also, following your advice, I did not save the results directly todata_all
. Instead, I saved the output todata_test
for each fold and merged them at the end.I was able to modify the
Trycatch()
part to be understandable by usingif...else....
As for the
data_all
anddata_split
part, the following suggested code did not work for some reason. I'm still trying to find out the reason...