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
Open sidebar
ift
NIFTy
Commits
dbeb8645
Commit
dbeb8645
authored
Aug 13, 2018
by
Philipp Arras
Browse files
Add properties to InverseGamma
parent
df4c4cac
Changes
2
Hide whitespace changes
Inline
Side-by-side
nifty5/library/amplitude_model.py
View file @
dbeb8645
...
...
@@ -24,7 +24,6 @@ from ..compat import *
from
..domains.power_space
import
PowerSpace
from
..domains.unstructured_domain
import
UnstructuredDomain
from
..field
import
Field
from
..multi_field
import
MultiField
from
..multi_domain
import
MultiDomain
from
..sugar
import
makeOp
,
sqrt
from
..operators.operator
import
Operator
...
...
@@ -149,3 +148,7 @@ class AmplitudeModel(Operator):
@
property
def
ceps
(
self
):
return
self
.
_ceps
@
property
def
norm_phi_mean
(
self
):
return
self
.
_norm_phi_mean
nifty5/library/inverse_gamma_model.py
View file @
dbeb8645
...
...
@@ -64,3 +64,11 @@ class InverseGammaModel(Operator):
def
inverseIG
(
self
,
u
,
alpha
,
q
):
res
=
norm
.
ppf
(
invgamma
.
cdf
(
u
.
local_data
,
alpha
,
scale
=
q
))
return
Field
.
from_local_data
(
u
.
domain
,
res
)
@
property
def
alpha
(
self
):
return
self
.
_alpha
@
property
def
q
(
self
):
return
self
.
_q
Write
Preview
Supports
Markdown
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