R/RcppExports.R

Defines functions R_has_openmp addto_R_list_inplace modify_R_list_inplace deepcopy_int get_ntrees get_null_int_mat get_empty_int_mat get_empty_tmat assign_csc_cols copy_csc_cols_by_index copy_csc_cols_by_slice call_take_cols_by_index_csc call_take_cols_by_slice_csc call_take_cols_by_index_csr call_take_cols_by_slice_csr deepcopy_vector call_reconstruct_csr_with_categ call_reconstruct_csr_sliced call_sort_csc_indices deserialize_from_file serialize_to_file compare_pointers get_null_R_pointer_internal get_num_references check_node_indexer_has_references set_reference_points check_node_indexer_has_distances build_tree_indices copy_cpp_objects model_to_json model_to_graphviz model_to_sql_with_select_from model_to_sql append_trees_from_other get_n_nodes inplace_set_to_zero subset_trees drop_reference_points drop_indexer drop_imputer impute_iso dist_iso predict_iso fit_tree fit_model check_null_ptr_model_internal serialize_Indexer_from_ptr serialize_Imputer_from_ptr serialize_ExtIsoForest_from_ptr serialize_IsoForest_from_ptr deserialize_Indexer deserialize_Imputer deserialize_ExtIsoForest deserialize_IsoForest

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

deserialize_IsoForest <- function(src) {
    .Call(`_isotree_deserialize_IsoForest`, src)
}

deserialize_ExtIsoForest <- function(src) {
    .Call(`_isotree_deserialize_ExtIsoForest`, src)
}

deserialize_Imputer <- function(src) {
    .Call(`_isotree_deserialize_Imputer`, src)
}

deserialize_Indexer <- function(src) {
    .Call(`_isotree_deserialize_Indexer`, src)
}

serialize_IsoForest_from_ptr <- function(R_ptr) {
    .Call(`_isotree_serialize_IsoForest_from_ptr`, R_ptr)
}

serialize_ExtIsoForest_from_ptr <- function(R_ptr) {
    .Call(`_isotree_serialize_ExtIsoForest_from_ptr`, R_ptr)
}

serialize_Imputer_from_ptr <- function(R_ptr) {
    .Call(`_isotree_serialize_Imputer_from_ptr`, R_ptr)
}

serialize_Indexer_from_ptr <- function(R_ptr) {
    .Call(`_isotree_serialize_Indexer_from_ptr`, R_ptr)
}

check_null_ptr_model_internal <- function(ptr_model) {
    .Call(`_isotree_check_null_ptr_model_internal`, ptr_model)
}

fit_model <- function(X_num, X_cat, ncat, Xc, Xc_ind, Xc_indptr, sample_weights, col_weights, nrows, ncols_numeric, ncols_categ, ndim, ntry, coef_type, coef_by_prop, with_replacement, weight_as_sample, sample_size, ntrees, max_depth, ncols_per_tree, limit_depth, penalize_range, standardize_data, scoring_metric, fast_bratio, calc_dist, standardize_dist, sq_dist, calc_depth, standardize_depth, weigh_by_kurt, prob_pick_by_gain_pl, prob_pick_by_gain_avg, prob_pick_by_full_gain, prob_pick_by_dens, prob_pick_col_by_range, prob_pick_col_by_var, prob_pick_col_by_kurt, min_gain, cat_split_type, new_cat_action, missing_action, all_perm, build_imputer, output_imputations, min_imp_obs, depth_imp, weigh_imp_rows, random_seed, use_long_double, nthreads, lazy_serialization) {
    .Call(`_isotree_fit_model`, X_num, X_cat, ncat, Xc, Xc_ind, Xc_indptr, sample_weights, col_weights, nrows, ncols_numeric, ncols_categ, ndim, ntry, coef_type, coef_by_prop, with_replacement, weight_as_sample, sample_size, ntrees, max_depth, ncols_per_tree, limit_depth, penalize_range, standardize_data, scoring_metric, fast_bratio, calc_dist, standardize_dist, sq_dist, calc_depth, standardize_depth, weigh_by_kurt, prob_pick_by_gain_pl, prob_pick_by_gain_avg, prob_pick_by_full_gain, prob_pick_by_dens, prob_pick_col_by_range, prob_pick_col_by_var, prob_pick_col_by_kurt, min_gain, cat_split_type, new_cat_action, missing_action, all_perm, build_imputer, output_imputations, min_imp_obs, depth_imp, weigh_imp_rows, random_seed, use_long_double, nthreads, lazy_serialization)
}

fit_tree <- function(model_R_ptr, serialized_obj, serialized_imputer, indexer_R_ptr, serialized_indexer, X_num, X_cat, ncat, Xc, Xc_ind, Xc_indptr, sample_weights, col_weights, nrows, ncols_numeric, ncols_categ, ndim, ntry, coef_type, coef_by_prop, max_depth, ncols_per_tree, limit_depth, penalize_range, standardize_data, fast_bratio, weigh_by_kurt, prob_pick_by_gain_pl, prob_pick_by_gain_avg, prob_pick_by_full_gain, prob_pick_by_dens, prob_pick_col_by_range, prob_pick_col_by_var, prob_pick_col_by_kurt, min_gain, cat_split_type, new_cat_action, missing_action, build_imputer, min_imp_obs, imp_R_ptr, depth_imp, weigh_imp_rows, all_perm, ref_X_num, ref_X_cat, ref_Xc, ref_Xc_ind, ref_Xc_indptr, random_seed, use_long_double, model_cpp_obj_update, model_params_update, is_altrepped) {
    invisible(.Call(`_isotree_fit_tree`, model_R_ptr, serialized_obj, serialized_imputer, indexer_R_ptr, serialized_indexer, X_num, X_cat, ncat, Xc, Xc_ind, Xc_indptr, sample_weights, col_weights, nrows, ncols_numeric, ncols_categ, ndim, ntry, coef_type, coef_by_prop, max_depth, ncols_per_tree, limit_depth, penalize_range, standardize_data, fast_bratio, weigh_by_kurt, prob_pick_by_gain_pl, prob_pick_by_gain_avg, prob_pick_by_full_gain, prob_pick_by_dens, prob_pick_col_by_range, prob_pick_col_by_var, prob_pick_col_by_kurt, min_gain, cat_split_type, new_cat_action, missing_action, build_imputer, min_imp_obs, imp_R_ptr, depth_imp, weigh_imp_rows, all_perm, ref_X_num, ref_X_cat, ref_Xc, ref_Xc_ind, ref_Xc_indptr, random_seed, use_long_double, model_cpp_obj_update, model_params_update, is_altrepped))
}

predict_iso <- function(model_R_ptr, is_extended, indexer_R_ptr, outp, tree_num, tree_depths, X_num, X_cat, Xc, Xc_ind, Xc_indptr, Xr, Xr_ind, Xr_indptr, nrows, nthreads, standardize) {
    invisible(.Call(`_isotree_predict_iso`, model_R_ptr, is_extended, indexer_R_ptr, outp, tree_num, tree_depths, X_num, X_cat, Xc, Xc_ind, Xc_indptr, Xr, Xr_ind, Xr_indptr, nrows, nthreads, standardize))
}

dist_iso <- function(model_R_ptr, indexer_R_ptr, tmat, dmat, rmat, is_extended, X_num, X_cat, Xc, Xc_ind, Xc_indptr, nrows, use_long_double, nthreads, assume_full_distr, standardize_dist, sq_dist, n_from, use_reference_points, as_kernel) {
    invisible(.Call(`_isotree_dist_iso`, model_R_ptr, indexer_R_ptr, tmat, dmat, rmat, is_extended, X_num, X_cat, Xc, Xc_ind, Xc_indptr, nrows, use_long_double, nthreads, assume_full_distr, standardize_dist, sq_dist, n_from, use_reference_points, as_kernel))
}

impute_iso <- function(model_R_ptr, imputer_R_ptr, is_extended, X_num, X_cat, Xr, Xr_ind, Xr_indptr, nrows, use_long_double, nthreads) {
    .Call(`_isotree_impute_iso`, model_R_ptr, imputer_R_ptr, is_extended, X_num, X_cat, Xr, Xr_ind, Xr_indptr, nrows, use_long_double, nthreads)
}

drop_imputer <- function(is_altrepped, free_cpp, lst_imputer, lst_cpp_objects, lst_params) {
    invisible(.Call(`_isotree_drop_imputer`, is_altrepped, free_cpp, lst_imputer, lst_cpp_objects, lst_params))
}

drop_indexer <- function(is_altrepped, free_cpp, lst_indexer, lst_cpp_objects, lst_metadata) {
    invisible(.Call(`_isotree_drop_indexer`, is_altrepped, free_cpp, lst_indexer, lst_cpp_objects, lst_metadata))
}

drop_reference_points <- function(is_altrepped, lst_indexer, lst_cpp_objects, lst_metadata) {
    invisible(.Call(`_isotree_drop_reference_points`, is_altrepped, lst_indexer, lst_cpp_objects, lst_metadata))
}

subset_trees <- function(model_R_ptr, imputer_R_ptr, indexer_R_ptr, is_extended, is_altrepped, trees_take) {
    .Call(`_isotree_subset_trees`, model_R_ptr, imputer_R_ptr, indexer_R_ptr, is_extended, is_altrepped, trees_take)
}

inplace_set_to_zero <- function(obj) {
    invisible(.Call(`_isotree_inplace_set_to_zero`, obj))
}

get_n_nodes <- function(model_R_ptr, is_extended, nthreads) {
    .Call(`_isotree_get_n_nodes`, model_R_ptr, is_extended, nthreads)
}

append_trees_from_other <- function(model_R_ptr, other_R_ptr, imp_R_ptr, oimp_R_ptr, ind_R_ptr, oind_R_ptr, is_extended, serialized_obj, serialized_imputer, serialized_indexer, model_cpp_obj_update, model_params_update, is_altrepped) {
    invisible(.Call(`_isotree_append_trees_from_other`, model_R_ptr, other_R_ptr, imp_R_ptr, oimp_R_ptr, ind_R_ptr, oind_R_ptr, is_extended, serialized_obj, serialized_imputer, serialized_indexer, model_cpp_obj_update, model_params_update, is_altrepped))
}

model_to_sql <- function(model_R_ptr, is_extended, numeric_colanmes, categ_colnames, categ_levels, output_tree_num, single_tree, tree_num, nthreads) {
    .Call(`_isotree_model_to_sql`, model_R_ptr, is_extended, numeric_colanmes, categ_colnames, categ_levels, output_tree_num, single_tree, tree_num, nthreads)
}

model_to_sql_with_select_from <- function(model_R_ptr, is_extended, numeric_colanmes, categ_colnames, categ_levels, table_from, select_as, nthreads) {
    .Call(`_isotree_model_to_sql_with_select_from`, model_R_ptr, is_extended, numeric_colanmes, categ_colnames, categ_levels, table_from, select_as, nthreads)
}

model_to_graphviz <- function(model_R_ptr, is_extended, indexer_R_ptr, numeric_colanmes, categ_colnames, categ_levels, output_tree_num, single_tree, tree_num, nthreads) {
    .Call(`_isotree_model_to_graphviz`, model_R_ptr, is_extended, indexer_R_ptr, numeric_colanmes, categ_colnames, categ_levels, output_tree_num, single_tree, tree_num, nthreads)
}

model_to_json <- function(model_R_ptr, is_extended, indexer_R_ptr, numeric_colanmes, categ_colnames, categ_levels, output_tree_num, single_tree, tree_num, nthreads) {
    .Call(`_isotree_model_to_json`, model_R_ptr, is_extended, indexer_R_ptr, numeric_colanmes, categ_colnames, categ_levels, output_tree_num, single_tree, tree_num, nthreads)
}

copy_cpp_objects <- function(model_R_ptr, is_extended, imp_R_ptr, ind_R_ptr, lazy_serialization) {
    .Call(`_isotree_copy_cpp_objects`, model_R_ptr, is_extended, imp_R_ptr, ind_R_ptr, lazy_serialization)
}

build_tree_indices <- function(lst_cpp_objects, ptr_model, is_altrepped, is_extended, with_distances, nthreads) {
    invisible(.Call(`_isotree_build_tree_indices`, lst_cpp_objects, ptr_model, is_altrepped, is_extended, with_distances, nthreads))
}

check_node_indexer_has_distances <- function(indexer_R_ptr) {
    .Call(`_isotree_check_node_indexer_has_distances`, indexer_R_ptr)
}

set_reference_points <- function(lst_cpp_objects, ptr_model, ind_R_ptr, is_altrepped, lst_metadata, rnames, is_extended, X_num, X_cat, Xc, Xc_ind, Xc_indptr, nrows, nthreads, with_distances) {
    invisible(.Call(`_isotree_set_reference_points`, lst_cpp_objects, ptr_model, ind_R_ptr, is_altrepped, lst_metadata, rnames, is_extended, X_num, X_cat, Xc, Xc_ind, Xc_indptr, nrows, nthreads, with_distances))
}

check_node_indexer_has_references <- function(indexer_R_ptr) {
    .Call(`_isotree_check_node_indexer_has_references`, indexer_R_ptr)
}

get_num_references <- function(indexer_R_ptr) {
    .Call(`_isotree_get_num_references`, indexer_R_ptr)
}

get_null_R_pointer_internal <- function(altrepped) {
    .Call(`_isotree_get_null_R_pointer_internal`, altrepped)
}

compare_pointers <- function(obj1, obj2) {
    .Call(`_isotree_compare_pointers`, obj1, obj2)
}

serialize_to_file <- function(serialized_obj, serialized_imputer, serialized_indexer, is_extended, metadata, fname) {
    invisible(.Call(`_isotree_serialize_to_file`, serialized_obj, serialized_imputer, serialized_indexer, is_extended, metadata, fname))
}

deserialize_from_file <- function(fname, lazy_serialization) {
    .Call(`_isotree_deserialize_from_file`, fname, lazy_serialization)
}

call_sort_csc_indices <- function(Xc, Xc_ind, Xc_indptr) {
    invisible(.Call(`_isotree_call_sort_csc_indices`, Xc, Xc_ind, Xc_indptr))
}

call_reconstruct_csr_sliced <- function(orig_Xr, orig_Xr_indptr, rec_Xr, rec_Xr_indptr, nrows) {
    invisible(.Call(`_isotree_call_reconstruct_csr_sliced`, orig_Xr, orig_Xr_indptr, rec_Xr, rec_Xr_indptr, nrows))
}

call_reconstruct_csr_with_categ <- function(orig_Xr, orig_Xr_ind, orig_Xr_indptr, rec_Xr, rec_Xr_ind, rec_Xr_indptr, rec_X_cat, cols_numeric, cols_categ, nrows, ncols) {
    invisible(.Call(`_isotree_call_reconstruct_csr_with_categ`, orig_Xr, orig_Xr_ind, orig_Xr_indptr, rec_Xr, rec_Xr_ind, rec_Xr_indptr, rec_X_cat, cols_numeric, cols_categ, nrows, ncols))
}

deepcopy_vector <- function(inp) {
    .Call(`_isotree_deepcopy_vector`, inp)
}

call_take_cols_by_slice_csr <- function(Xr_, Xr_ind_, Xr_indptr, ncols_take, as_dense) {
    .Call(`_isotree_call_take_cols_by_slice_csr`, Xr_, Xr_ind_, Xr_indptr, ncols_take, as_dense)
}

call_take_cols_by_index_csr <- function(Xr, Xr_ind, Xr_indptr, cols_take, as_dense) {
    .Call(`_isotree_call_take_cols_by_index_csr`, Xr, Xr_ind, Xr_indptr, cols_take, as_dense)
}

call_take_cols_by_slice_csc <- function(Xc, Xc_ind, Xc_indptr, ncols_take, as_dense, nrows) {
    .Call(`_isotree_call_take_cols_by_slice_csc`, Xc, Xc_ind, Xc_indptr, ncols_take, as_dense, nrows)
}

call_take_cols_by_index_csc <- function(Xc_, Xc_ind_, Xc_indptr, cols_take, as_dense, nrows) {
    .Call(`_isotree_call_take_cols_by_index_csc`, Xc_, Xc_ind_, Xc_indptr, cols_take, as_dense, nrows)
}

copy_csc_cols_by_slice <- function(out_Xc_, out_Xc_indptr, from_Xc_, from_Xc_indptr, n_copy) {
    invisible(.Call(`_isotree_copy_csc_cols_by_slice`, out_Xc_, out_Xc_indptr, from_Xc_, from_Xc_indptr, n_copy))
}

copy_csc_cols_by_index <- function(out_Xc_, out_Xc_indptr, from_Xc_, from_Xc_indptr, cols_copy) {
    invisible(.Call(`_isotree_copy_csc_cols_by_index`, out_Xc_, out_Xc_indptr, from_Xc_, from_Xc_indptr, cols_copy))
}

assign_csc_cols <- function(Xc_, Xc_ind_, Xc_indptr, X_cat_, cols_categ, cols_numeric, nrows) {
    .Call(`_isotree_assign_csc_cols`, Xc_, Xc_ind_, Xc_indptr, X_cat_, cols_categ, cols_numeric, nrows)
}

get_empty_tmat <- function(nrows_) {
    .Call(`_isotree_get_empty_tmat`, nrows_)
}

get_empty_int_mat <- function(nrows, ncols) {
    .Call(`_isotree_get_empty_int_mat`, nrows, ncols)
}

get_null_int_mat <- function() {
    .Call(`_isotree_get_null_int_mat`)
}

get_ntrees <- function(model_R_ptr, is_extended) {
    .Call(`_isotree_get_ntrees`, model_R_ptr, is_extended)
}

deepcopy_int <- function(x) {
    .Call(`_isotree_deepcopy_int`, x)
}

modify_R_list_inplace <- function(lst, ix, el) {
    invisible(.Call(`_isotree_modify_R_list_inplace`, lst, ix, el))
}

addto_R_list_inplace <- function(lst, nm, el) {
    invisible(.Call(`_isotree_addto_R_list_inplace`, lst, nm, el))
}

R_has_openmp <- function() {
    .Call(`_isotree_R_has_openmp`)
}

Try the isotree package in your browser

Any scripts or data that you put into this service are public.

isotree documentation built on May 29, 2024, 11:24 a.m.