Skip to content

Commit 95c8866

Browse files
authored
clarify optional arguments (#41)
1 parent c4284a1 commit 95c8866

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pymc_experimental/bart/utils.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from scipy.stats import pearsonr
1111

1212

13-
def predict(idata, rng, X=None, size=None, excluded=None):
13+
def predict(idata, rng, X, size=None, excluded=None):
1414
"""
1515
Generate samples from the BART-posterior.
1616
@@ -49,7 +49,7 @@ def predict(idata, rng, X=None, size=None, excluded=None):
4949

5050
def plot_dependence(
5151
idata,
52-
X=None,
52+
X,
5353
Y=None,
5454
kind="pdp",
5555
xs_interval="linear",
@@ -157,7 +157,6 @@ def plot_dependence(
157157
else:
158158
Y_label = "Predicted Y"
159159

160-
num_observations = X.shape[0]
161160
num_covariates = X.shape[1]
162161

163162
indices = list(range(num_covariates))
@@ -297,9 +296,7 @@ def plot_dependence(
297296
return axes
298297

299298

300-
def plot_variable_importance(
301-
idata, X=None, labels=None, figsize=None, samples=100, random_seed=None
302-
):
299+
def plot_variable_importance(idata, X, labels=None, figsize=None, samples=100, random_seed=None):
303300
"""
304301
Estimates variable importance from the BART-posterior.
305302

0 commit comments

Comments
 (0)