Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
On Thursday, 7th July from 1 to 3 pm there will be a maintenance with a short downtime of GitLab.
Open sidebar
ift
NIFTy
Commits
c1ba0c60
Commit
c1ba0c60
authored
Aug 13, 2018
by
Philipp Arras
Browse files
Cleanup in InverseGammaModel
parent
08f43b49
Changes
1
Show whitespace changes
Inline
Side-by-side
nifty5/library/inverse_gamma_model.py
View file @
c1ba0c60
...
...
@@ -56,12 +56,12 @@ class InverseGammaModel(Operator):
return
Linearization
(
points
,
jac
)
@
staticmethod
def
IG
(
self
,
field
,
alpha
,
q
):
def
IG
(
field
,
alpha
,
q
):
foo
=
invgamma
.
ppf
(
norm
.
cdf
(
field
.
local_data
),
alpha
,
scale
=
q
)
return
Field
.
from_local_data
(
field
.
domain
,
foo
)
@
staticmethod
def
inverseIG
(
self
,
u
,
alpha
,
q
):
def
inverseIG
(
u
,
alpha
,
q
):
res
=
norm
.
ppf
(
invgamma
.
cdf
(
u
.
local_data
,
alpha
,
scale
=
q
))
return
Field
.
from_local_data
(
u
.
domain
,
res
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment