Closed EoghanONeill closed 5 years ago
The easiest solution is to remove the get_subset() function and replace the following
data_curr_node=get_subset(data,wrap(grow_obs))
with
data_curr_node=data.rows(grow_obs)
Well spotted!
yes this was a typo in the get_subset function it was supposed to get the grow_obs[i] th row of the dataset but was only getting the ith row.
Your solution also works so we'll go with that!.
The get_subset function returns the first grow_obs.size() rows of the input data. However, it should probably return the rows indexed by grow_obs?
This is important for lines 946-952 of BARTBMA_SumTreeLikelihood.cpp, so that the function correctly continues to the next changepoint if the current potential changepoint would send too few observations left or right.