Skip to content

Commit

Permalink
regression trees up and rdy for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
bcjaeger committed Nov 13, 2023
1 parent 8ccb638 commit bdfa0cc
Show file tree
Hide file tree
Showing 37 changed files with 2,245 additions and 884 deletions.
16 changes: 10 additions & 6 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ compute_pred_prob_exported <- function(y, w) {
.Call(`_aorsf_compute_pred_prob_exported`, y, w)
}

expand_y_clsf <- function(y, n_class) {
.Call(`_aorsf_expand_y_clsf`, y, n_class)
compute_var_reduction_exported <- function(y_node, w_node, g_node) {
.Call(`_aorsf_compute_var_reduction_exported`, y_node, w_node, g_node)
}

is_col_splittable_exported <- function(x, y, r, j) {
Expand Down Expand Up @@ -73,11 +73,15 @@ cph_scale <- function(x, w) {
.Call(`_aorsf_cph_scale`, x, w)
}

orsf_cpp <- function(x, y, w, tree_type_R, tree_seeds, loaded_forest, lincomb_R_function, oobag_R_function, n_tree, mtry, sample_with_replacement, sample_fraction, vi_type_R, vi_max_pvalue, leaf_min_events, leaf_min_obs, split_rule_R, split_min_events, split_min_obs, split_min_stat, split_max_cuts, split_max_retry, lincomb_type_R, lincomb_eps, lincomb_iter_max, lincomb_scale, lincomb_alpha, lincomb_df_target, lincomb_ties_method, pred_mode, pred_type_R, pred_horizon, pred_aggregate, oobag, oobag_eval_type_R, oobag_eval_every, pd_type_R, pd_x_vals, pd_x_cols, pd_probs, n_thread, write_forest, run_forest, verbosity) {
.Call(`_aorsf_orsf_cpp`, x, y, w, tree_type_R, tree_seeds, loaded_forest, lincomb_R_function, oobag_R_function, n_tree, mtry, sample_with_replacement, sample_fraction, vi_type_R, vi_max_pvalue, leaf_min_events, leaf_min_obs, split_rule_R, split_min_events, split_min_obs, split_min_stat, split_max_cuts, split_max_retry, lincomb_type_R, lincomb_eps, lincomb_iter_max, lincomb_scale, lincomb_alpha, lincomb_df_target, lincomb_ties_method, pred_mode, pred_type_R, pred_horizon, pred_aggregate, oobag, oobag_eval_type_R, oobag_eval_every, pd_type_R, pd_x_vals, pd_x_cols, pd_probs, n_thread, write_forest, run_forest, verbosity)
expand_y_clsf <- function(y, n_class) {
.Call(`_aorsf_expand_y_clsf`, y, n_class)
}

compute_mse_exported <- function(y, w, p) {
.Call(`_aorsf_compute_mse_exported`, y, w, p)
}

compute_var_reduction <- function(y_node, w_node, g_node) {
.Call(`_aorsf_compute_var_reduction`, y_node, w_node, g_node)
orsf_cpp <- function(x, y, w, tree_type_R, tree_seeds, loaded_forest, lincomb_R_function, oobag_R_function, n_tree, mtry, sample_with_replacement, sample_fraction, vi_type_R, vi_max_pvalue, leaf_min_events, leaf_min_obs, split_rule_R, split_min_events, split_min_obs, split_min_stat, split_max_cuts, split_max_retry, lincomb_type_R, lincomb_eps, lincomb_iter_max, lincomb_scale, lincomb_alpha, lincomb_df_target, lincomb_ties_method, pred_mode, pred_type_R, pred_horizon, pred_aggregate, oobag, oobag_eval_type_R, oobag_eval_every, pd_type_R, pd_x_vals, pd_x_cols, pd_probs, n_thread, write_forest, run_forest, verbosity) {
.Call(`_aorsf_orsf_cpp`, x, y, w, tree_type_R, tree_seeds, loaded_forest, lincomb_R_function, oobag_R_function, n_tree, mtry, sample_with_replacement, sample_fraction, vi_type_R, vi_max_pvalue, leaf_min_events, leaf_min_obs, split_rule_R, split_min_events, split_min_obs, split_min_stat, split_max_cuts, split_max_retry, lincomb_type_R, lincomb_eps, lincomb_iter_max, lincomb_scale, lincomb_alpha, lincomb_df_target, lincomb_ties_method, pred_mode, pred_type_R, pred_horizon, pred_aggregate, oobag, oobag_eval_type_R, oobag_eval_every, pd_type_R, pd_x_vals, pd_x_cols, pd_probs, n_thread, write_forest, run_forest, verbosity)
}

3 changes: 2 additions & 1 deletion R/orsf.R
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ orsf <- function(data,
pred_type = oobag_pred_type,
oobag_pred_horizon = oobag_pred_horizon,
oobag_eval_every = oobag_eval_every,
oobag_fun = oobag_fun,
importance_type = importance,
importance_max_pvalue = importance_max_pvalue,
importance_group_factors = group_factors,
Expand All @@ -391,7 +392,7 @@ orsf <- function(data,
tree_type,
'survival' = do.call(ObliqueForestSurvival$new, args = args),
'classification' = do.call(ObliqueForestClassification$new, args = args),
'regression' = stop("not ready yet")
'regression' = do.call(ObliqueForestRegression$new, args = args)
)

if(no_fit) return(object)
Expand Down
Loading

0 comments on commit bdfa0cc

Please sign in to comment.