Closed timothy-glover closed 1 week ago
Attention: Patch coverage is 81.81818%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 93.95%. Comparing base (
f67aead
) to head (2e262df
).
Files | Patch % | Lines |
---|---|---|
stonesoup/sensormanager/reward.py | 81.81% | 1 Missing and 1 partial :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR introduces several minor updates, mainly to the
UncertaintyRewardFunction
. The first change is to addreturn_tracks
as a property to theUncertaintyRewardFunction
allowing it to be used with the MCTS type sensor managers and any other sensor management algorithm that requires storage and reuse of states estimated during reward calculation. A test has also been added to verify this functionality with MCTS.The second change to
UncertaintyRewardFunction
is in generating detections from predicted future target states. As themeasure
method of a sensor is not designed to operate on particle states, it will return a measurement for everystate_vector
instate_vectors
of theParticleState
which is not handled by aParticleUpdater
under usual circumstances. To prevent this problem, the mean ofpredicted_track
objects are used to construct aGroundTruthState
which is passed into themeasure
method. This generates a single measurement from theParticleState
objects and has no effect when dealing withGaussianState
types.GroundTruthState
also allows for track metadata to be stored in the object.The third chance is to add a property to the
UncertaintyRewardFunction
has also been added,measurement_noise
, which allows the user to decide whether noise should be added when generating predicted future measurements. This defaults toFalse
, as it was before this change.For
ExpectedKLDivergence
andMultiUpdateKLDivergence
, as these classes were constructing aState
object when generating measurements, this has been updated to theGroundTruthState
inline with theUncertaintyRewardFunction
to allow for metadata passing. Themeasurement_noise
property has also been added to these classes.