Skip to content

Instantly share code, notes, and snippets.

@AustinRochford
Last active November 1, 2021 10:46
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save AustinRochford/4b8a163b66a11cdcbc430797b9b664fe to your computer and use it in GitHub Desktop.
Save AustinRochford/4b8a163b66a11cdcbc430797b9b664fe to your computer and use it in GitHub Desktop.
Bayesian Parametric Survival Analysis with PyMC3
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@peadarcoylezopa
Copy link

Hey Austin. I run into a bug on this around the \nu cens - TypeError: TensorType does not support boolean mask for indexing such as tensor[x==0]. Instead you can use non_zeros() such as tensor[(x == 0).nonzeros()].

Any suggestions. I tried doing n[(cens).nonzero()] but it leads to problems with alignment further on.

@AustinRochford
Copy link
Author

@peadarcoylezopa what PyMC3 and Theano versions are you using?

@springcoil
Copy link

Hey Austin - the bug turned out to be fixed by a newer version of theano.

@AustinRochford
Copy link
Author

Glad to hear it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment