Skip to content

Commit

Permalink
Merge pull request #136 from amarquand/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
amarquand authored Aug 23, 2023
2 parents ad5b2b6 + a13f907 commit 95d6eb2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pcntoolkit/model/SHASH.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def dist(cls, mu, sigma, epsilon, delta, **kwargs):

def logp(value, mu, sigma, epsilon, delta):
mean = m(epsilon, delta, 1)
var = m(epsilon, delta, 2)
var = m(epsilon, delta, 2) - mean**2
remapped_value = ((value - mu) / sigma) * np.sqrt(var) + mean
this_S = S(remapped_value, epsilon, delta)
this_S_sqr = np.square(this_S)
Expand Down
7 changes: 7 additions & 0 deletions pcntoolkit/model/hbr.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,13 @@ def estimate(self, X, y, batch_effects, **kwargs):
dummy_array = xarray.DataArray(data = np.zeros((len(chain), len(draw), 1)), coords = {'chain':chain, 'draw':draw,'empty':np.array([0])}, name=j)
self.idata.posterior[j] = dummy_array
self.vars_to_sample.append(j)

# zero-out all data
for i in self.idata.constant_data.data_vars:
self.idata.constant_data[i] *= 0
for i in self.idata.observed_data.data_vars:
self.idata.observed_data[i] *= 0

return self.idata

def predict(
Expand Down

0 comments on commit 95d6eb2

Please sign in to comment.