Closed GaryBAYLOR closed 2 years ago
To improve code readability, it is better to remove the R code that is no longer needed, instead of commenting out but retaining each line. The historical code can be easily tracked in the commit histories in Github.
For example,
In CVtreeMLE.R line 408-411,
# mixed_comb_results <- est_comb_mixture_rules(At, Av, W, Y, rules, no_mix_rules, Q1_stack) # fold_results_mix_combo_data[[fold_k]] <- mixed_comb_results$data # fold_results_mix_Sls[[fold_k]] <- mixed_comb_results$learner results_list <- list( fold_results_mix_rules, mix_fold_data, mix_fold_directions, fold_results_marg_rules, fold_results_marg_directions, fold_results_marginal_data, # fold_results_marginal_additive_data, fold_results_marginal_combo_data, fold_results_marginal_Sls # fold_results_mix_combo_data, # fold_results_mix_Sls )
can be reduced to
results_list <- list( fold_results_mix_rules, mix_fold_data, mix_fold_directions, fold_results_marg_rules, fold_results_marg_directions, fold_results_marginal_data, fold_results_marginal_combo_data, fold_results_marginal_Sls )
The same applies to other parts of the function and other functions.
I've done a massive editing and via linting identified and removed all these areas.
To improve code readability, it is better to remove the R code that is no longer needed, instead of commenting out but retaining each line. The historical code can be easily tracked in the commit histories in Github.
For example,
In CVtreeMLE.R line 408-411,
can be reduced to
The same applies to other parts of the function and other functions.