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
IMAGINE
Commits
065852c8
Commit
065852c8
authored
Mar 13, 2017
by
Theo Steininger
Browse files
Added normalization to EnsembleLikelihood.
parent
db6718c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
imagine/likelihoods/ensemble_likelihood/ensemble_likelihood.py
View file @
065852c8
...
...
@@ -81,11 +81,20 @@ class EnsembleLikelihood(Likelihood):
second_summand
=
first_summand
.
copy_empty
()
second_summand
.
val
=
second_summand_val
result_1
=
c
.
dot
(
first_summand
)
result_2
=
c
.
dot
(
second_summand
)
result_1
=
-
c
.
dot
(
first_summand
)
result_2
=
-
c
.
dot
(
second_summand
)
result
=
result_1
+
result_2
self
.
logger
.
debug
(
"Calculated: %f + %f = %f"
%
(
result_1
,
result_2
,
result
))
result_array
[
i
]
=
result
return
-
result_array
.
mean
()
total_result
=
result_array
.
mean
()
normalization
=
measured_data
.
dot
(
measured_data
)
normalized_total_result
=
total_result
/
normalization
self
.
logger
.
info
(
"Applied normalization for total result: "
"%f / %f = %f"
%
(
total_result
,
normalization
,
normalized_total_result
))
return
normalized_total_result
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