Skip to content

Commit

Permalink
version 1.0-11
Browse files Browse the repository at this point in the history
  • Loading branch information
raghvendra5688 authored and cran-robot committed Apr 14, 2023
1 parent 30656e7 commit 80c5df5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Package: RGBM
Type: Package
Title: LS-TreeBoost and LAD-TreeBoost for Gene Regulatory Network
Reconstruction
Version: 1.0-10
Date: 2022-09-25
Version: 1.0-11
Date: 2023-04-13
Author: Raghvendra Mall [aut, cre],
Khalid Kunji [aut],
Melissa O'Neill [ctb]
Expand All @@ -17,5 +17,5 @@ License: GPL (>= 3)
LazyLoad: yes
Depends: foreach, plyr, doParallel
NeedsCompilation: yes
Packaged: 2022-09-25 11:49:58 UTC; rmall
Date/Publication: 2022-09-26 07:10:10 UTC
Packaged: 2023-04-13 05:20:19 UTC; raghvendra
Date/Publication: 2023-04-14 08:50:14 UTC
8 changes: 4 additions & 4 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ac18e772aeba619feec6931cb70729b4 *DESCRIPTION
2720e1c59e428d2938243ed322d7b0fc *DESCRIPTION
43c6737dbf86ce00d8d71edb4821a5bb *NAMESPACE
233f76ea882528c6cb2891a0ac721f99 *R/GBM.R
3e0b1f671174b0f89196d4823fb55291 *R/GBM.test.R
Expand Down Expand Up @@ -36,11 +36,11 @@ f37253d913461c94cc1b0e9c2006d1e7 *man/normalize_matrix_colwise.Rd
f8578d694b247191dea4b761dbe8d726 *src/Model.h
67e9c9edc9444f9379a7e7527a6d83b4 *src/Prediction.h
816a3253639f49c879b218a8fea94ac5 *src/R_init_RGBM.c
be41e1925cb325134cd3eba9146c5e88 *src/pcg_basic.c
bcb0a707738a401d2a3583b20429b38a *src/pcg_basic.c
1c5d0bb60da87eae144c92908cfcbf43 *src/pcg_basic.h
d91f2330e26658fe30e67f60224c57e6 *src/regression_stump.h
a08dc7c53b556feca16fe58711654d11 *src/solver_test.cpp
a5fd997114614edea413bb5ef40c0cdf *src/solver_test.cpp
3584090f43282dab73019078bff9fbac *src/test_regression_stump.cpp
6f6a9de713b8d64826d897c35cfab2d6 *src/test_regression_stump_R.cpp
e3776b98991d41554f1b50d8ea35ac27 *src/train_regression_stump.cpp
964b7a729a77685906901dd559897460 *src/train_regression_stump.cpp
93aeef0c0baaf8509848a7780b5c38d1 *src/train_regression_stump_R.cpp
8 changes: 4 additions & 4 deletions src/pcg_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ uint32_t pcg32_random_r(pcg32_random_t* rng)
return (xorshifted >> rot) | (xorshifted << ((-rot) & 31));
}

uint32_t pcg32_random()
{
return pcg32_random_r(&pcg32_global);
}
//uint32_t pcg32_random()
//{
// return pcg32_random_r(&pcg32_global);
//}


// pcg32_boundedrand(bound):
Expand Down
2 changes: 1 addition & 1 deletion src/solver_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int main() {
// *never* have random sequences that coincide, at all) - the code below
// shows three possible ways to do so.
bool seed_given = false;
uint64_t seed;
uint64_t seed = 123;
if (seed_given) {
pcg32_srandom(42u, seed);
} else {
Expand Down
5 changes: 3 additions & 2 deletions src/train_regression_stump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ inline int compare(const void *a, const void *b) {
return 0;
}

static pcg32_random_t pcg32_global = PCG32_INITIALIZER;

const Model train_regression_stump(const int N, const int P, const double *x,
const double *y, const double col_sampling_rate,
Expand All @@ -109,7 +110,7 @@ const Model train_regression_stump(const int N, const int P, const double *x,
// *never* have random sequences that coincide, at all) - the code below
// shows three possible ways to do so.
bool seed_given = false;
uint64_t seed;
uint64_t seed = 123;
if (seed_given) {
pcg32_srandom(42u, seed);
} else {
Expand Down Expand Up @@ -268,7 +269,7 @@ const Model train_regression_stump(const int N, const int P, const double *x,
P_unique_inbag = ceil(col_sampling_rate * P);
P_already_bagged = 0;
for (s = 0; s < P; s++) {
if (((float)ldexp((double)pcg32_random(), -32)) * (P - s)
if (((float)ldexp((double)pcg32_random_r(&pcg32_global), -32)) * (P - s)
< P_unique_inbag - P_already_bagged) {
// if ((1.0 * rand() / RAND_MAX) * (P - s)
// < P_unique_inbag - P_already_bagged) {
Expand Down

0 comments on commit 80c5df5

Please sign in to comment.