Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/forest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ void initialize_forest_model_cpp(cpp11::external_pointer<StochTree::ForestDatase

// Unpack initial value
int num_trees = forest_samples->NumTrees();
double init_val;
double init_val = 0.0;
std::vector<double> init_value_vector;
if ((model_type == StochTree::ModelType::kConstantLeafGaussian) ||
(model_type == StochTree::ModelType::kUnivariateRegressionLeafGaussian) ||
Expand Down Expand Up @@ -812,7 +812,7 @@ void initialize_forest_model_active_forest_cpp(cpp11::external_pointer<StochTree

// Unpack initial value
int num_trees = active_forest->NumTrees();
double init_val;
double init_val = 0.0;
std::vector<double> init_value_vector;
if ((model_type == StochTree::ModelType::kConstantLeafGaussian) ||
(model_type == StochTree::ModelType::kUnivariateRegressionLeafGaussian) ||
Expand Down
4 changes: 2 additions & 2 deletions src/sampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void sample_gfr_one_iteration_cpp(cpp11::external_pointer<StochTree::ForestDatas
else StochTree::Log::Fatal("Invalid model type");

// Unpack leaf model parameters
double leaf_scale;
double leaf_scale = 0.0;
Eigen::MatrixXd leaf_scale_matrix;
if ((model_type == StochTree::ModelType::kConstantLeafGaussian) ||
(model_type == StochTree::ModelType::kUnivariateRegressionLeafGaussian)) {
Expand Down Expand Up @@ -141,7 +141,7 @@ void sample_mcmc_one_iteration_cpp(cpp11::external_pointer<StochTree::ForestData
else StochTree::Log::Fatal("Invalid model type");

// Unpack leaf model parameters
double leaf_scale;
double leaf_scale = 0.0;
Eigen::MatrixXd leaf_scale_matrix;
if ((model_type == StochTree::ModelType::kConstantLeafGaussian) ||
(model_type == StochTree::ModelType::kUnivariateRegressionLeafGaussian)) {
Expand Down
Loading