Support #2658
Negative -logL
Status: | Closed | Start date: | 08/02/2018 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assigned To: | - | % Done: | 100% | |
Category: | - | |||
Target version: | - | |||
Duration: |
Description
In some cases for Fermi/LAT data analysis ctlike reports negative -logL values which are decreasing further during the optimization. Since logL is a sum of non-positive log-probabilities, -logL can not take negative values.
The issue seems to be present only for a long (e.g. whole 10 years of Fermi/LAT data) datasets, for short periods -logL is positive.
Please, find minimal working example reproducing the problem at
https://www.dropbox.com/s/qyge5k79lmu1e18/negativeLL.tgz?dl=0
(please link also standard fermi/lat galactic diffuse background model to downloaded folder as glprp.fits )
I’ve also attached corresponding ctlike.log file to this issue.
Maybe the problem is related to the bug #1869.
The problem might also not be real and related just to an output format for log-like, which exceeds some value for a long dataset.
Recurrence
No recurrence.
History
#1 Updated by Knödlseder Jürgen over 6 years ago
- Tracker changed from Bug to Support
This is not a bug but a feature. In fact the factorial term is not included in the logL since it’s a constant and would only eat up computation time. Therefore the value can be positive or negative.
See our article for the full mathematics: https://www.aanda.org/articles/aa/abs/2016/09/aa28822-16/aa28822-16.html, specifically equations (1) and (3).
#2 Updated by Malyshev Denys over 6 years ago
Ah, I see. Thanks, Jurgen!
#3 Updated by Knödlseder Jürgen over 6 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100