bart.particle_tree#

Module: bart.particle_tree#

Inheritance diagram for ISLP.bart.particle_tree:

digraph inheritancefdbc56115d { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "bart.particle_tree.ParticleTree" [URL="#ISLP.bart.particle_tree.ParticleTree",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="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)#