@@ -65,7 +65,7 @@ def rng_fn(
65
65
66
66
67
67
class BART (Distribution ):
68
- """
68
+ r """
69
69
Bayesian Additive Regression Tree distribution.
70
70
71
71
Distribution representing a sum over trees
@@ -77,17 +77,26 @@ class BART(Distribution):
77
77
Y : TensorLike
78
78
The response vector.
79
79
m : int
80
- Number of trees
80
+ Number of trees.
81
81
response : str
82
82
How the leaf_node values are computed. Available options are ``constant``, ``linear`` or
83
83
``mix``. Defaults to ``constant``.
84
84
alpha : float
85
- Control the prior probability over the depth of the trees. Even when it can takes values in
86
- the interval (0, 1), it is recommended to be in the interval (0, 0.5].
85
+ Controls the prior probability over the depth of the trees.
86
+ Should be in the (0, 1) interval.
87
+ beta : float
88
+ Controls the prior probability over the number of leaves of the trees.
89
+ Should be positive.
87
90
split_prior : Optional[List[float]], default None.
88
91
Each element of split_prior should be in the [0, 1] interval and the elements should sum to
89
92
1. Otherwise they will be normalized.
90
93
Defaults to 0, i.e. all covariates have the same prior probability to be selected.
94
+
95
+ Notes
96
+ -----
97
+ The parameters ``alpha`` and ``beta`` parametrize the probability that a node at
98
+ depth :math:`d \: (= 0, 1, 2,...)` is non-terminal, given by :math:`\alpha(1 + d)^{-\beta}`.
99
+ The default values are :math:`\alpha = 0.95` and :math:`\beta = 2`.
91
100
"""
92
101
93
102
def __new__ (
@@ -97,7 +106,7 @@ def __new__(
97
106
Y : TensorLike ,
98
107
m : int = 50 ,
99
108
alpha : float = 0.95 ,
100
- beta : float = 2 ,
109
+ beta : float = 2.0 ,
101
110
response : str = "constant" ,
102
111
split_prior : Optional [List [float ]] = None ,
103
112
** kwargs ,
0 commit comments