Skip to content

Commit

Permalink
Merge pull request #33 from traja-team/vae.rebase
Browse files Browse the repository at this point in the history
Vae.rebase
  • Loading branch information
WolfByttner authored Jan 2, 2021
2 parents fedaba6 + e814c3e commit 25b497f
Show file tree
Hide file tree
Showing 36 changed files with 4,382 additions and 187 deletions.
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ target/

.DS_Store

# Visualstudio code file
.vscode
# celery beat schedule file
celerybeat-schedule

Expand Down Expand Up @@ -111,8 +113,17 @@ _build/

# BUILD FILES
*.zip
hypers.json
model

docs/source/gallery
docs/source/savefig
docs/source/reference
docs/source/autoexamples

# Editor files
*.swp
*.swo


# Model parameter files
*.pt
31 changes: 15 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ dist: xenial
language: python

python:
- '3.6'
- '3.7'
- '3.8'

git:
depth: false
Expand All @@ -23,23 +23,22 @@ before_install:
- sudo chmod 2777 /usr/local/lib/R/site-library

install:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda

# Update dependencies
- conda env create -n test-environment -f environment.yml python=$TRAVIS_PYTHON_VERSION
- source activate test-environment
# Doc/Test requirements
- pip install -r docs/requirements.txt
- pip install .

- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
-O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
- source activate test-environment
- pip install -r requirements-dev.txt
- pip install -r docs/requirements.txt
- pip install --upgrade pytest flake8 sphinx
- pip install .
script:
- cd docs && make doctest && cd ..
- py.test . --cov-report term --cov=traja --ignore tests/test_rutils.py
- py.test .

after_success:
- codecov
Expand Down
17 changes: 17 additions & 0 deletions docs/neuralnets/train_lstm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

"""
Train LSTM model for time series forecasting
"""
import traja
from traja.model import LSTM
from traja.datasets import dataset

df = traja.TrajaDataFrame({"x": [0, 1, 2, 3, 4], "y": [1, 3, 2, 4, 5]})

# Dataloader

# Model instance

# Trainer


20 changes: 10 additions & 10 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
pandas
ipython
numpy
pandas>=1.2.0
numpy==1.18.5
matplotlib
shapely
scipy
sklearn
sphinx
sphinx-gallery
fastdtw
pillow
tzlocal
sphinx_rtd_theme
fastdtw
plotly
networkx
seaborn
torch
pytest
pytest-cov
codecov
readline
rpy2
h5py
ipython
75 changes: 67 additions & 8 deletions docs/source/reference/traja.TrajaDataFrame.examples
Original file line number Diff line number Diff line change
@@ -1,40 +1,99 @@


Examples using ``traja.TrajaDataFrame``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="3D Plotting with traja">

.. only:: html

.. figure:: /gallery/images/thumb/sphx_glr_plot_3d_thumb.png
.. figure:: /gallery/images/thumb/sphx_glr_plot_3d_thumb.png
:alt: 3D Plotting with traja

:ref:`sphx_glr_gallery_plot_3d.py`
:ref:`sphx_glr_gallery_plot_3d.py`

.. raw:: html

</div>

.. only:: not html

* :ref:`sphx_glr_gallery_plot_3d.py`
* :ref:`sphx_glr_gallery_plot_3d.py`

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Basic plotting with traja">
<div class="sphx-glr-thumbcontainer" tooltip="Average direction for each grid cell">

.. only:: html

.. figure:: /gallery/images/thumb/sphx_glr_plot_with_traja_thumb.png
.. figure:: /gallery/images/thumb/sphx_glr_plot_average_direction_thumb.png
:alt: Average direction for each grid cell

:ref:`sphx_glr_gallery_plot_with_traja.py`
:ref:`sphx_glr_gallery_plot_average_direction.py`

.. raw:: html

</div>

.. only:: not html

* :ref:`sphx_glr_gallery_plot_with_traja.py`
* :ref:`sphx_glr_gallery_plot_average_direction.py`

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Plotting Multiple Trajectories">

.. only:: html

.. figure:: /gallery/images/thumb/sphx_glr_plot_collection_thumb.png
:alt: Plotting Multiple Trajectories

:ref:`sphx_glr_gallery_plot_collection.py`

.. raw:: html

</div>

.. only:: not html

* :ref:`sphx_glr_gallery_plot_collection.py`

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Comparing">

.. only:: html

.. figure:: /gallery/images/thumb/sphx_glr_plot_comparing_thumb.png
:alt: Comparing

:ref:`sphx_glr_gallery_plot_comparing.py`

.. raw:: html

</div>

.. only:: not html

* :ref:`sphx_glr_gallery_plot_comparing.py`

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Plotting trajectories on a grid">

.. only:: html

.. figure:: /gallery/images/thumb/sphx_glr_plot_grid_thumb.png
:alt: Plotting trajectories on a grid

:ref:`sphx_glr_gallery_plot_grid.py`

.. raw:: html

</div>

.. only:: not html

* :ref:`sphx_glr_gallery_plot_grid.py`
55 changes: 21 additions & 34 deletions docs/source/reference/traja.generate.examples
Original file line number Diff line number Diff line change
@@ -1,112 +1,99 @@


Examples using ``traja.generate``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="3D Plotting with traja">

.. only:: html

.. figure:: /gallery/images/thumb/sphx_glr_plot_3d_thumb.png
.. figure:: /gallery/images/thumb/sphx_glr_plot_3d_thumb.png
:alt: 3D Plotting with traja

:ref:`sphx_glr_gallery_plot_3d.py`
:ref:`sphx_glr_gallery_plot_3d.py`

.. raw:: html

</div>

.. only:: not html

* :ref:`sphx_glr_gallery_plot_3d.py`
* :ref:`sphx_glr_gallery_plot_3d.py`

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Average direction for each grid cell">

.. only:: html

.. figure:: /gallery/images/thumb/sphx_glr_plot_average_direction_thumb.png
.. figure:: /gallery/images/thumb/sphx_glr_plot_average_direction_thumb.png
:alt: Average direction for each grid cell

:ref:`sphx_glr_gallery_plot_average_direction.py`
:ref:`sphx_glr_gallery_plot_average_direction.py`

.. raw:: html

</div>

.. only:: not html

* :ref:`sphx_glr_gallery_plot_average_direction.py`
* :ref:`sphx_glr_gallery_plot_average_direction.py`

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Plotting Multiple Trajectories">

.. only:: html

.. figure:: /gallery/images/thumb/sphx_glr_plot_collection_thumb.png
.. figure:: /gallery/images/thumb/sphx_glr_plot_collection_thumb.png
:alt: Plotting Multiple Trajectories

:ref:`sphx_glr_gallery_plot_collection.py`
:ref:`sphx_glr_gallery_plot_collection.py`

.. raw:: html

</div>

.. only:: not html

* :ref:`sphx_glr_gallery_plot_collection.py`
* :ref:`sphx_glr_gallery_plot_collection.py`

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Comparing">

.. only:: html

.. figure:: /gallery/images/thumb/sphx_glr_plot_comparing_thumb.png
.. figure:: /gallery/images/thumb/sphx_glr_plot_comparing_thumb.png
:alt: Comparing

:ref:`sphx_glr_gallery_plot_comparing.py`
:ref:`sphx_glr_gallery_plot_comparing.py`

.. raw:: html

</div>

.. only:: not html

* :ref:`sphx_glr_gallery_plot_comparing.py`
* :ref:`sphx_glr_gallery_plot_comparing.py`

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Plotting trajectories on a grid">

.. only:: html

.. figure:: /gallery/images/thumb/sphx_glr_plot_grid_thumb.png
.. figure:: /gallery/images/thumb/sphx_glr_plot_grid_thumb.png
:alt: Plotting trajectories on a grid

:ref:`sphx_glr_gallery_plot_grid.py`
:ref:`sphx_glr_gallery_plot_grid.py`

.. raw:: html

</div>

.. only:: not html

* :ref:`sphx_glr_gallery_plot_grid.py`

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Basic plotting with traja">

.. only:: html

.. figure:: /gallery/images/thumb/sphx_glr_plot_with_traja_thumb.png

:ref:`sphx_glr_gallery_plot_with_traja.py`

.. raw:: html

</div>

.. only:: not html

* :ref:`sphx_glr_gallery_plot_with_traja.py`
* :ref:`sphx_glr_gallery_plot_grid.py`
21 changes: 13 additions & 8 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
pandas>=1.2.0
numpy==1.18.5
matplotlib
shapely
psutil
scipy
sklearn
fastdtw
plotly
networkx
seaborn
torch
pytest
Sphinx
sphinx_gallery
sphinx_rtd_theme
pillow
black
pre-commit
pyinstaller
pyqt5
h5py
Loading

0 comments on commit 25b497f

Please sign in to comment.