-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of Non-Gaussian transition models #1043
base: main
Are you sure you want to change the base?
Conversation
Initial commit to introduce Levy (non-Gaussian) transition models
Co-authored-by: Christopher Sherman <146717651+csherman-dstl@users.noreply.github.com>
…h initialisation.
…very well in sphinx.
b85df1e
to
de58f3b
Compare
docs/tutorials/11_LevyTransitionModels_&_MarginalisedParticleFilter.ipynb
Outdated
Show resolved
Hide resolved
...als/.ipynb_checkpoints/11_LevyTransitionModels_&_MarginalisedParticleFilter-checkpoint.ipynb
Outdated
Show resolved
Hide resolved
@hpritchett-dstl Additionally, I noticed that some of my formatting changes might have affected other parts of the repository that aren’t mine. I’ll need more time to undo those, but it might be helpful if we had standardized code styles throughout the repository. For example:
Lastly, it would be really helpful to have a local development setup that mirrors the CircleCI test environment. This way, I could run the tests locally and address any issues before pushing changes. A docker image would be great! |
f788491
to
19d9940
Compare
19d9940
to
f98c93b
Compare
99d144d
to
9209cf0
Compare
9209cf0
to
dff4b12
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made some comments on the tutorial that could do with being applied throughout to make the documentation render properly.
There is some guidance here which might be useful: https://sphinx-gallery.github.io/stable/syntax.html - you can also render the docs locally by running python -m sphinx -W docs/source docs/build
.
# The state of the target can be represented as 2D Cartesian coordinates, $\left[x, \dot x, y, \dot y\right]^{\top}$, modelling both its position and velocity. A simple truth path is created with a sampling rate of 1 Hz. | ||
|
||
# In[2]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous comment (check my editing of the maths here though)
# The state of the target can be represented as 2D Cartesian coordinates, $\left[x, \dot x, y, \dot y\right]^{\top}$, modelling both its position and velocity. A simple truth path is created with a sampling rate of 1 Hz. | |
# In[2]: | |
# %% | |
# The state of the target can be represented as 2D Cartesian coordinates, :math`[x, \dot{x}, y, \dot{y}]^{\top}`, modelling both its position and velocity. A simple truth path is created with a sampling rate of 1 Hz. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can also render the docs locally by running python -m sphinx -W docs/source docs/build.
Thanks for that, will try! That being said, running -W
fails as there appears as warnings from other sources that are treated as errors. For example,
generating gallery...
generating gallery for auto_tutorials... [ 9%] 01_KalmanFilterTutorial.py
Warning, treated as error:
../tutorials/01_KalmanFilterTutorial.py unexpectedly failed to execute correctly:
Traceback (most recent call last):
File "/Users/chongzhenyuen/Documents/iib-project/stonesoup/docs/tutorials/01_KalmanFilterTutorial.py", line 192, in <module>
plotter.plot_ground_truths(truth, [0, 2])
File "/Users/chongzhenyuen/Documents/iib-project/stonesoup/stonesoup/plotter.py", line 2495, in plot_ground_truths
self.fig.add_trace(go.Scatter(truth_kwargs))
File "/Users/chongzhenyuen/miniforge3/envs/iib-project/lib/python3.10/site-packages/plotly/graph_objs/_scatter.py", line 3192, in __init__
self._process_kwargs(**dict(arg, **kwargs))
File "/Users/chongzhenyuen/miniforge3/envs/iib-project/lib/python3.10/site-packages/plotly/basedatatypes.py", line 4322, in _process_kwargs
raise err
ValueError: Invalid property specified for object of type plotly.graph_objs.Scatter: 'legendrank'
Did you mean "legendgroup"?
# Consider the scenario where the target evolves according to the Langevin model, driven by a normal sigma-mean mixture with the mixing distribution being the $\alpha$-stable distribution. | ||
|
||
# In[1]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each section of text in the tutorial (i.e. not code) needs to begin with # %%
. To format mathematical symbols you need to wrap in ":math:maths_goes_here
". You can also remove all the # In[]
lines from the tutorial file.
# Consider the scenario where the target evolves according to the Langevin model, driven by a normal sigma-mean mixture with the mixing distribution being the $\alpha$-stable distribution. | |
# In[1]: | |
# %% | |
# Consider the scenario where the target evolves according to the Langevin model, driven by a normal sigma-mean mixture with the mixing distribution being the :math:`\alpha`-stable distribution. |
@hpritchett-dstl
Features:
Refactored:
LevyLangevin
modelTodo:
Additional comments:
I believe the current design is a good compromise between speed and compatibility with the existing stone soup framework to avoid introducing any breaking changes. The newly introduced models decouple the deterministic (transition model) and non-deterministic (noise driver) components. That being said, suggestions are welcome and highly appreciated.