bart.particle_tree#
Module: bart.particle_tree
#
Inheritance diagram for ISLP.bart.particle_tree
:
Class#
ParticleTree
#
- class ISLP.bart.particle_tree.ParticleTree(tree, resid, log_weight, split_prob, min_depth, X_missing, ssv, available_predictors, m, sigmasq, mu_prior_mean, mu_prior_var, random_state)#
Bases:
object
Particle tree
Methods
increment_loglikelihood
marginal_loglikelihood
sample_tree_sequential
sample_values
set_resid
- __init__(tree, resid, log_weight, split_prob, min_depth, X_missing, ssv, available_predictors, m, sigmasq, mu_prior_mean, mu_prior_var, random_state)#
- increment_loglikelihood(left_node, right_node)#
- marginal_loglikelihood()#
- sample_tree_sequential(X, X_quantiles, resid)#
- sample_values(resid)#
- set_resid(resid)#
Functions#
- ISLP.bart.particle_tree.discrete_uniform_sampler(upper_value, random_state)#
Draw an integer from the uniform distribution with bounds [0, upper_value). This is the same and np.random.randit(upper_value) but faster.
- ISLP.bart.particle_tree.get_new_idx_data_points(split_value, idx_data_points, X_select)#
- ISLP.bart.particle_tree.grow_tree(tree, index_leaf_node, split_prior, available_predictors, X, X_quantiles, X_missing, random_state)#