Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hierarchical-bayesian-models
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rutger van Haasteren
hierarchical-bayesian-models
Commits
15725eac
Commit
15725eac
authored
1 year ago
by
Rutger van Haasteren
Browse files
Options
Downloads
Patches
Plain Diff
Changed definition of powerlaw_flat_tail
parent
18eeaf21
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
prior_wrapper.py
+4
-3
4 additions, 3 deletions
prior_wrapper.py
with
4 additions
and
3 deletions
prior_wrapper.py
+
4
−
3
View file @
15725eac
...
@@ -70,6 +70,7 @@ import scipy.linalg as sl
...
@@ -70,6 +70,7 @@ import scipy.linalg as sl
import
re
import
re
from
enterprise.signals.parameter
import
function
from
enterprise.signals.parameter
import
function
import
enterprise.constants
as
const
import
enterprise.constants
as
const
import
enterprise.signals.gp_priors
as
gp_priors
class
kumaraswamy_distribution
(
sstats
.
rv_continuous
):
class
kumaraswamy_distribution
(
sstats
.
rv_continuous
):
"""
Kumaraswamy distribution like for scipy
"""
"""
Kumaraswamy distribution like for scipy
"""
...
@@ -211,9 +212,9 @@ def ptapar_mapping(pta):
...
@@ -211,9 +212,9 @@ def ptapar_mapping(pta):
@function
@function
def
powerlaw_flat_tail
(
f
,
log10_A
=-
16
,
gamma
=
5
,
log10_kappa
=-
7
,
components
=
2
):
def
powerlaw_flat_tail
(
f
,
log10_A
=-
16
,
gamma
=
5
,
log10_kappa
=-
7
,
components
=
2
):
df
=
np
.
diff
(
np
.
concatenate
((
np
.
array
([
0
]),
f
[::
components
])))
df
=
np
.
diff
(
np
.
concatenate
((
np
.
array
([
0
]),
f
[::
components
])))
return
(
pl
=
(
10
**
log10_A
)
**
2
/
12.0
/
np
.
pi
**
2
*
const
.
fyr
**
(
gamma
-
3
)
*
f
**
(
-
gamma
)
*
np
.
repeat
(
df
,
components
)
(
10
**
log10_A
)
**
2
/
12.0
/
np
.
pi
**
2
*
const
.
fyr
**
(
gamma
-
3
)
*
f
**
(
-
gamma
)
*
np
.
repeat
(
df
,
components
)
+
10
**
(
2
*
log10_kappa
)
flat
=
10
**
(
2
*
log10_kappa
)
)
return
np
.
maximum
(
pl
,
flat
)
class
BoundedMvNormalPlHierarchicalPrior
(
object
):
class
BoundedMvNormalPlHierarchicalPrior
(
object
):
"""
Class to represent a Bounded MvNormal hierarchical prior for Enterprise Powerlaw Signals
"""
"""
Class to represent a Bounded MvNormal hierarchical prior for Enterprise Powerlaw Signals
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment