Skip to content

Commit 711f4e5

Browse files
authored
Merge pull request #360 from StochasticTree/rfx-cpp-hotfix
Fix assignment bug in RFX category tracker data structure
2 parents 3bd4c04 + f999d65 commit 711f4e5

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
## Bug Fixes
1111

12+
* Fixed assignment bug in RFX category tracker data structure [#360](https://github.com/StochasticTree/stochtree/pull/360)
1213
* Fixed several initialization, sampling and prediction bugs for cloglog [#357](https://github.com/StochasticTree/stochtree/pull/357)
1314
* Fixed num_threads pass-through bug in R BART [#339](https://github.com/StochasticTree/stochtree/pull/339)
1415
* Fixed probit offset bug in R and Python [#337](https://github.com/StochasticTree/stochtree/pull/337)

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
## Bug Fixes
99

10+
* Fixed assignment bug in RFX category tracker data structure [#360](https://github.com/StochasticTree/stochtree/pull/360)
1011
* Fixed several initialization, sampling and prediction bugs for cloglog [#357](https://github.com/StochasticTree/stochtree/pull/357)
1112
* Fixed num_threads pass-through bug in R BART [#339](https://github.com/StochasticTree/stochtree/pull/339)
1213
* Fixed probit offset bug in R and Python [#337](https://github.com/StochasticTree/stochtree/pull/337)

include/stochtree/category_tracker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class SampleCategoryMapper {
6060

6161
inline void SetCategoryId(data_size_t sample_id, int category_id) {
6262
CHECK_LT(sample_id, num_observations_);
63-
observation_indices_[sample_id] = sample_id;
63+
observation_indices_[sample_id] = category_id;
6464
}
6565

6666
inline int NumObservations() {return num_observations_;}

0 commit comments

Comments
 (0)