Skip to content
Merged
8 changes: 4 additions & 4 deletions cpp/include/cuml/ensemble/randomforest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void fit(const raft::handle_t& user_handle,
RF_params rf_params,
rapids_logger::level_enum verbosity = rapids_logger::level_enum::info,
bool* bootstrap_masks = nullptr,
const float* sample_weight = nullptr);
const double* sample_weight = nullptr);
void fit(const raft::handle_t& user_handle,
RandomForestClassifierD* forest,
double* input,
Expand All @@ -177,7 +177,7 @@ void fit_treelite(const raft::handle_t& user_handle,
bool* bootstrap_masks,
T* feature_importances,
rapids_logger::level_enum verbosity,
const T* sample_weight = nullptr);
const double* sample_weight = nullptr);

void predict(const raft::handle_t& user_handle,
const RandomForestClassifierF* forest,
Expand Down Expand Up @@ -236,7 +236,7 @@ void fit(const raft::handle_t& user_handle,
RF_params rf_params,
rapids_logger::level_enum verbosity = rapids_logger::level_enum::info,
bool* bootstrap_masks = nullptr,
const float* sample_weight = nullptr);
const double* sample_weight = nullptr);
void fit(const raft::handle_t& user_handle,
RandomForestRegressorD* forest,
double* input,
Expand All @@ -259,7 +259,7 @@ void fit_treelite(const raft::handle_t& user_handle,
bool* bootstrap_masks,
T* feature_importances,
rapids_logger::level_enum verbosity,
const T* sample_weight = nullptr);
const double* sample_weight = nullptr);

void predict(const raft::handle_t& user_handle,
const RandomForestRegressorF* forest,
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/decisiontree/batched-levelalgo/builder.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ struct Builder {
const DecisionTreeParams& p,
const DataT* data,
const LabelT* labels,
const DataT* sample_weight,
const double* sample_weight,
IdxT n_rows,
IdxT n_cols,
rmm::device_uvector<IdxT>* row_ids,
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/decisiontree/batched-levelalgo/dataset.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ struct Dataset {
/** input labels */
const LabelT* labels;
/** optional input sample weights */
const DataT* sample_weight;
const double* sample_weight;
/** total rows in dataset */
IdxT M;
/** total cols in dataset */
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/decisiontree/decisiontree.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ class DecisionTree {
uint64_t seed,
const Quantiles<DataT, int>& quantiles,
int treeid,
const DataT* sample_weight = nullptr)
const double* sample_weight = nullptr)
{
if (params.split_criterion ==
CRITERION::CRITERION_END) { // Set default to GINI (classification) or MSE (regression)
Expand Down
12 changes: 6 additions & 6 deletions cpp/src/randomforest/randomforest.cu
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ void fit(const raft::handle_t& user_handle,
RF_params rf_params,
rapids_logger::level_enum verbosity,
bool* bootstrap_masks,
const float* sample_weight)
const double* sample_weight)
{
raft::common::nvtx::range fun_scope("RF::fit @randomforest.cu");
ML::default_logger().set_level(verbosity);
Expand Down Expand Up @@ -422,7 +422,7 @@ void fit_treelite(const raft::handle_t& user_handle,
bool* bootstrap_masks,
value_t* feature_importances,
rapids_logger::level_enum verbosity,
const value_t* sample_weight)
const double* sample_weight)
{
RandomForestMetaData<value_t, label_t> metadata;
fit(user_handle,
Expand Down Expand Up @@ -605,7 +605,7 @@ void fit(const raft::handle_t& user_handle,
RF_params rf_params,
rapids_logger::level_enum verbosity,
bool* bootstrap_masks,
const float* sample_weight)
const double* sample_weight)
{
raft::common::nvtx::range fun_scope("RF::fit @randomforest.cu");
ML::default_logger().set_level(verbosity);
Expand Down Expand Up @@ -653,7 +653,7 @@ void fit_treelite(const raft::handle_t& user_handle,
bool* bootstrap_masks,
value_t* feature_importances,
rapids_logger::level_enum verbosity,
const value_t* sample_weight)
const double* sample_weight)
{
RandomForestMetaData<value_t, label_t> metadata;
fit(user_handle,
Expand Down Expand Up @@ -873,7 +873,7 @@ template CUML_EXPORT void fit_treelite<float, int>(const raft::handle_t& user_ha
bool* bootstrap_masks,
float* feature_importances,
rapids_logger::level_enum verbosity,
const float* sample_weight);
const double* sample_weight);
template CUML_EXPORT void fit_treelite<double, int>(const raft::handle_t& user_handle,
TreeliteModelHandle* model,
double* input,
Expand All @@ -896,7 +896,7 @@ template CUML_EXPORT void fit_treelite<float, float>(const raft::handle_t& user_
bool* bootstrap_masks,
float* feature_importances,
rapids_logger::level_enum verbosity,
const float* sample_weight);
const double* sample_weight);
template CUML_EXPORT void fit_treelite<double, double>(const raft::handle_t& user_handle,
TreeliteModelHandle* model,
double* input,
Expand Down
Loading
Loading