-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
C++Anything referring to the underlying C++ implementation.Anything referring to the underlying C++ implementation.
Milestone
Description
randomPlantedForest/src/randomPlantedForest.cpp
Lines 2053 to 2058 in 3d3b10b
| std::vector<std::vector<double>> W = *split.W, W_new = *split.W; | |
| for(int p=0; p<value_size; ++p){ | |
| for(auto individual: split.I_s){ | |
| W[individual][p] = exp(W[individual][p]); | |
| W_new[individual][p] = exp(W_new[individual][p] + log(M_s[p] / M_sp) - W_s_mean[p]); |
If
W and W_new are the same, why then treat them separately below?
randomPlantedForest/src/randomPlantedForest.cpp
Lines 2068 to 2069 in 3d3b10b
| split.min_sum += (*split.Y)[individual][p] * log(W[individual][p] / (1 + std::accumulate(W[individual].begin(), W[individual].end(), 0.0)) ); // ~ R_old | |
| split.min_sum -= (*split.Y)[individual][p] * log(W_new[individual][p] / (1 + std::accumulate(W_new[individual].begin(), W_new[individual].end(), 0.0)) ); // ~ R_new |
W and W_new are the same, so nothing happens?And won't this give
log(0) in some cases?Metadata
Metadata
Assignees
Labels
C++Anything referring to the underlying C++ implementation.Anything referring to the underlying C++ implementation.