@@ -20,7 +20,7 @@ def create_model(self):
20
20
"""
21
21
Creates and returns the PyMC3 model.
22
22
23
- Returns the model and the output variable. The latter is for use in ADVI minibatch .
23
+ Returns the model.
24
24
"""
25
25
model_input = theano .shared (np .zeros ([1 , self .num_pred ]))
26
26
@@ -54,7 +54,7 @@ def create_model(self):
54
54
55
55
o = pm .Bernoulli ('o' , p , observed = model_output )
56
56
57
- return model , o
57
+ return model
58
58
59
59
def fit (self , X , y , cats , n = 200000 , batch_size = 100 ):
60
60
"""
@@ -76,7 +76,7 @@ def fit(self, X, y, cats, n=200000, batch_size=100):
76
76
num_samples , self .num_pred = X .shape
77
77
78
78
if self .cached_model is None :
79
- self .cached_model , o = self .create_model ()
79
+ self .cached_model = self .create_model ()
80
80
81
81
with self .cached_model :
82
82
@@ -109,7 +109,7 @@ def predict_proba(self, X, cats, return_std=False):
109
109
num_samples = X .shape [0 ]
110
110
111
111
if self .cached_model is None :
112
- self .cached_model , o = self .create_model ()
112
+ self .cached_model = self .create_model ()
113
113
114
114
self ._set_shared_vars ({'model_input' : X , 'model_output' : np .zeros (num_samples ), 'model_cats' : cats })
115
115
0 commit comments