deepSSF 0.2.1__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {deepssf-0.2.1 → deepssf-0.2.3}/PKG-INFO +34 -23
- {deepssf-0.2.1 → deepssf-0.2.3}/README.md +33 -22
- {deepssf-0.2.1 → deepssf-0.2.3}/src/deepssf/__init__.py +1 -1
- {deepssf-0.2.1 → deepssf-0.2.3}/tests/test_deepssf.py +16 -11
- {deepssf-0.2.1 → deepssf-0.2.3}/.github/workflows/ci.yml +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/.github/workflows/publish.yml +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/.gitignore +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/.pre-commit-config.yaml +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/CHANGELOG.md +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/CITATION.cff +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/LICENSE +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/Package_generation_process.md +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/environment.yml +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example.html +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example.ipynb +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/figure-html/cell-15-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/figure-html/cell-17-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/figure-html/cell-19-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/figure-html/cell-21-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/figure-html/cell-23-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/figure-html/cell-24-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/figure-html/cell-25-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/figure-html/cell-27-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/figure-html/cell-28-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/figure-html/cell-29-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/figure-html/cell-30-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/figure-html/cell-32-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/figure-html/cell-7-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/libs/bootstrap/bootstrap-138a6193a3bd40baf1e627da441a4734.min.css +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/libs/bootstrap/bootstrap-icons.css +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/libs/bootstrap/bootstrap-icons.woff +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/libs/bootstrap/bootstrap.min.js +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/libs/clipboard/clipboard.min.js +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/libs/quarto-html/anchor.min.js +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/libs/quarto-html/popper.min.js +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/libs/quarto-html/quarto-syntax-highlighting-7f8f88aac4f3542376d5c11b86a4c14d.css +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/libs/quarto-html/quarto.js +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/libs/quarto-html/tabsets/tabsets.js +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/libs/quarto-html/tippy.css +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/deepssf_train_validate_example_files/libs/quarto-html/tippy.umd.min.js +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/examples/references.bib +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/icons/both_icons.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/icons/deepSSF_hex_textured_Python.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/icons/deepSSF_hex_textured_R.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/pyproject.toml +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/src/deepssf/data.py +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/src/deepssf/datasets/data/buffalo_djelk_id2005.csv +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/src/deepssf/datasets/data/ndvi_2005.tif +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/src/deepssf/datasets/data/slope_2005.tif +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/src/deepssf/model.py +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/src/deepssf/simulate.py +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/src/deepssf/train.py +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/src/deepssf/utils.py +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/src/deepssf/validate.py +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/styles.css +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/tests/__init__.py +0 -0
- {deepssf-0.2.1 → deepssf-0.2.3}/tests/test_smoke.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deepSSF
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Deep learning step selection functions for predicting animal movement.
|
|
5
5
|
Project-URL: Homepage, https://swforrest.github.io/deepSSF/
|
|
6
6
|
Project-URL: Repository, https://github.com/swforrest/deepssf
|
|
@@ -57,7 +57,7 @@ Forrest, S. W., Pagendam, D., Hassan, C., Potts, J. R., Drovandi, C., Bode, M.,
|
|
|
57
57
|
|
|
58
58
|
## Installation (pip only)
|
|
59
59
|
|
|
60
|
-
If you
|
|
60
|
+
If you already have a Python environment that you want to install the package into, install deepSSF with:
|
|
61
61
|
|
|
62
62
|
```bash
|
|
63
63
|
pip install deepssf
|
|
@@ -80,28 +80,39 @@ print(deepssf.__version__)
|
|
|
80
80
|
|
|
81
81
|
## Setting up (for users new to Python)
|
|
82
82
|
|
|
83
|
-
If you are coming from R, think of a conda environment the way you think of
|
|
84
|
-
an `renv` project library — it is a self-contained Python installation that
|
|
85
|
-
keeps this project's packages separate from everything else on your computer.
|
|
86
|
-
The steps below create one for deepssf and should take about five minutes.
|
|
87
|
-
|
|
88
83
|
### 1. Install Miniconda (once, system-wide)
|
|
89
84
|
|
|
90
85
|
Download and run the installer from the
|
|
91
86
|
[official Miniconda page](https://docs.anaconda.com/miniconda/).
|
|
92
87
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
If you click 'Download' towards the top right, the links to download
|
|
89
|
+
Miniconda are towards the bottom of the page - the links at the top are
|
|
90
|
+
for the Anaconda Distribution, which has thousands of pacakges and is
|
|
91
|
+
not necessary to get things up and running initially.
|
|
92
|
+
|
|
93
|
+
### 1b. (Optional) Install an IDE (such as VSCode)
|
|
94
|
+
|
|
95
|
+
Once you have Python and Miniconda installed, you will likely want an interface
|
|
96
|
+
(‘Integrated Development Environment’, an IDE) to code in (such as RStudio for R users).
|
|
97
|
+
I use Visual Studio Code, or ‘VS Code’ as I find the functionality similar to RStudio
|
|
98
|
+
(and as I have become familiar with VS Code I prefer it to RStudio in some ways).
|
|
96
99
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
You can download VSCode from here: [https://code.visualstudio.com/](https://code.visualstudio.com/).
|
|
101
|
+
|
|
102
|
+
For the commands below, you can use the Terminal directly in VScode (Terminal > New Terminal),
|
|
103
|
+
or the Terminal/Command Line in Windows or macOS.
|
|
100
104
|
|
|
101
105
|
### 2. Create the environment
|
|
102
106
|
|
|
107
|
+
Think of a conda environment the way you think of an `renv` project library —
|
|
108
|
+
it is a self-contained Python installation that
|
|
109
|
+
keeps this project's packages separate from everything else on your computer.
|
|
110
|
+
The steps below create one for deepSSF.
|
|
111
|
+
|
|
112
|
+
Using the Terminal (which can be in VScode), you can clone the package repository with:
|
|
113
|
+
|
|
103
114
|
```bash
|
|
104
|
-
git clone https://github.com/swforrest/
|
|
115
|
+
git clone https://github.com/swforrest/deepssf_package
|
|
105
116
|
cd deepssf
|
|
106
117
|
conda env create -f environment.yml
|
|
107
118
|
```
|
|
@@ -115,6 +126,8 @@ correct backend at runtime.
|
|
|
115
126
|
|
|
116
127
|
### 3. Activate the environment
|
|
117
128
|
|
|
129
|
+
Also in the Terminal:
|
|
130
|
+
|
|
118
131
|
```bash
|
|
119
132
|
conda activate deepssf
|
|
120
133
|
```
|
|
@@ -130,23 +143,21 @@ register the environment so it appears as a kernel option:
|
|
|
130
143
|
python -m ipykernel install --user --name deepssf --display-name "Python (deepssf)"
|
|
131
144
|
```
|
|
132
145
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
jupyter lab
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
Then open `examples/deepssf_train_validate_example.ipynb` to get started.
|
|
146
|
+
Then you can open `examples/deepssf_train_validate_example.ipynb` in VSCode to get started.
|
|
147
|
+
You can also view the knitted `deepssf_train_validate_example.html` script, which you
|
|
148
|
+
should be able to open in a browser such as Chrome.
|
|
140
149
|
|
|
141
150
|
---
|
|
142
151
|
|
|
143
152
|
## Documentation
|
|
144
153
|
|
|
145
|
-
|
|
154
|
+
There are additional tutorials and walkthroughs to help understand
|
|
155
|
+
deep learning concepts and the deepSSF approach, model and functions at:
|
|
156
|
+
https://swforrest.github.io/deepSSF/
|
|
146
157
|
|
|
147
158
|
## Citation
|
|
148
159
|
|
|
149
|
-
If you use
|
|
160
|
+
If you use deepSSF in your research, please cite the paper. See `CITATION.cff` or use the citation and link to paper below.
|
|
150
161
|
|
|
151
162
|
Forrest, S. W., Pagendam, D., Hassan, C., Potts, J. R., Drovandi, C., Bode, M., & Hoskins, A. J. (2026). **Predicting animal movement with deepSSF : A deep learning step selection framework**. Methods in Ecology and Evolution, 17(2), 371–391. https://doi.org/10.1111/2041-210x.70136
|
|
152
163
|
|
|
@@ -18,7 +18,7 @@ Forrest, S. W., Pagendam, D., Hassan, C., Potts, J. R., Drovandi, C., Bode, M.,
|
|
|
18
18
|
|
|
19
19
|
## Installation (pip only)
|
|
20
20
|
|
|
21
|
-
If you
|
|
21
|
+
If you already have a Python environment that you want to install the package into, install deepSSF with:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
24
|
pip install deepssf
|
|
@@ -41,28 +41,39 @@ print(deepssf.__version__)
|
|
|
41
41
|
|
|
42
42
|
## Setting up (for users new to Python)
|
|
43
43
|
|
|
44
|
-
If you are coming from R, think of a conda environment the way you think of
|
|
45
|
-
an `renv` project library — it is a self-contained Python installation that
|
|
46
|
-
keeps this project's packages separate from everything else on your computer.
|
|
47
|
-
The steps below create one for deepssf and should take about five minutes.
|
|
48
|
-
|
|
49
44
|
### 1. Install Miniconda (once, system-wide)
|
|
50
45
|
|
|
51
46
|
Download and run the installer from the
|
|
52
47
|
[official Miniconda page](https://docs.anaconda.com/miniconda/).
|
|
53
48
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
If you click 'Download' towards the top right, the links to download
|
|
50
|
+
Miniconda are towards the bottom of the page - the links at the top are
|
|
51
|
+
for the Anaconda Distribution, which has thousands of pacakges and is
|
|
52
|
+
not necessary to get things up and running initially.
|
|
53
|
+
|
|
54
|
+
### 1b. (Optional) Install an IDE (such as VSCode)
|
|
55
|
+
|
|
56
|
+
Once you have Python and Miniconda installed, you will likely want an interface
|
|
57
|
+
(‘Integrated Development Environment’, an IDE) to code in (such as RStudio for R users).
|
|
58
|
+
I use Visual Studio Code, or ‘VS Code’ as I find the functionality similar to RStudio
|
|
59
|
+
(and as I have become familiar with VS Code I prefer it to RStudio in some ways).
|
|
57
60
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
You can download VSCode from here: [https://code.visualstudio.com/](https://code.visualstudio.com/).
|
|
62
|
+
|
|
63
|
+
For the commands below, you can use the Terminal directly in VScode (Terminal > New Terminal),
|
|
64
|
+
or the Terminal/Command Line in Windows or macOS.
|
|
61
65
|
|
|
62
66
|
### 2. Create the environment
|
|
63
67
|
|
|
68
|
+
Think of a conda environment the way you think of an `renv` project library —
|
|
69
|
+
it is a self-contained Python installation that
|
|
70
|
+
keeps this project's packages separate from everything else on your computer.
|
|
71
|
+
The steps below create one for deepSSF.
|
|
72
|
+
|
|
73
|
+
Using the Terminal (which can be in VScode), you can clone the package repository with:
|
|
74
|
+
|
|
64
75
|
```bash
|
|
65
|
-
git clone https://github.com/swforrest/
|
|
76
|
+
git clone https://github.com/swforrest/deepssf_package
|
|
66
77
|
cd deepssf
|
|
67
78
|
conda env create -f environment.yml
|
|
68
79
|
```
|
|
@@ -76,6 +87,8 @@ correct backend at runtime.
|
|
|
76
87
|
|
|
77
88
|
### 3. Activate the environment
|
|
78
89
|
|
|
90
|
+
Also in the Terminal:
|
|
91
|
+
|
|
79
92
|
```bash
|
|
80
93
|
conda activate deepssf
|
|
81
94
|
```
|
|
@@ -91,23 +104,21 @@ register the environment so it appears as a kernel option:
|
|
|
91
104
|
python -m ipykernel install --user --name deepssf --display-name "Python (deepssf)"
|
|
92
105
|
```
|
|
93
106
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
jupyter lab
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
Then open `examples/deepssf_train_validate_example.ipynb` to get started.
|
|
107
|
+
Then you can open `examples/deepssf_train_validate_example.ipynb` in VSCode to get started.
|
|
108
|
+
You can also view the knitted `deepssf_train_validate_example.html` script, which you
|
|
109
|
+
should be able to open in a browser such as Chrome.
|
|
101
110
|
|
|
102
111
|
---
|
|
103
112
|
|
|
104
113
|
## Documentation
|
|
105
114
|
|
|
106
|
-
|
|
115
|
+
There are additional tutorials and walkthroughs to help understand
|
|
116
|
+
deep learning concepts and the deepSSF approach, model and functions at:
|
|
117
|
+
https://swforrest.github.io/deepSSF/
|
|
107
118
|
|
|
108
119
|
## Citation
|
|
109
120
|
|
|
110
|
-
If you use
|
|
121
|
+
If you use deepSSF in your research, please cite the paper. See `CITATION.cff` or use the citation and link to paper below.
|
|
111
122
|
|
|
112
123
|
Forrest, S. W., Pagendam, D., Hassan, C., Potts, J. R., Drovandi, C., Bode, M., & Hoskins, A. J. (2026). **Predicting animal movement with deepSSF : A deep learning step selection framework**. Methods in Ecology and Evolution, 17(2), 371–391. https://doi.org/10.1111/2041-210x.70136
|
|
113
124
|
|
|
@@ -7,7 +7,7 @@ expose the things you want people to rely on. Internal helpers stay private.
|
|
|
7
7
|
|
|
8
8
|
# Single source of truth for the version. hatchling reads this string at build
|
|
9
9
|
# time (see pyproject.toml [tool.hatch.version]). Bump it when you release.
|
|
10
|
-
__version__ = "0.2.
|
|
10
|
+
__version__ = "0.2.3"
|
|
11
11
|
|
|
12
12
|
from deepssf.data import (
|
|
13
13
|
MovementDataset,
|
|
@@ -371,7 +371,7 @@ def test_make_simulation_inputs_hour_wraps():
|
|
|
371
371
|
|
|
372
372
|
|
|
373
373
|
def test_simulate_next_step_returns_coords_and_tensors(small_params):
|
|
374
|
-
"""simulate_next_step returns new coordinates
|
|
374
|
+
"""simulate_next_step returns new coordinates."""
|
|
375
375
|
import math
|
|
376
376
|
|
|
377
377
|
import rasterio.transform
|
|
@@ -396,15 +396,12 @@ def test_simulate_next_step_returns_coords_and_tensors(small_params):
|
|
|
396
396
|
scalars = torch.zeros(1, 4)
|
|
397
397
|
bearing = torch.zeros(1, 1)
|
|
398
398
|
|
|
399
|
-
new_x, new_y,
|
|
399
|
+
new_x, new_y, px, py = simulate_next_step(
|
|
400
400
|
model, rasters, scalars, bearing, window_size=W,
|
|
401
401
|
x_loc=W * 25 / 2, y_loc=W * 25 / 2, transform=transform,
|
|
402
402
|
)
|
|
403
403
|
assert isinstance(new_x, float)
|
|
404
404
|
assert isinstance(new_y, float)
|
|
405
|
-
assert hab.shape == (W, W)
|
|
406
|
-
assert move.shape == (W, W)
|
|
407
|
-
assert step.shape == (W, W)
|
|
408
405
|
assert 0 <= px < W
|
|
409
406
|
assert 0 <= py < W
|
|
410
407
|
|
|
@@ -676,11 +673,19 @@ def test_prepare_movement_df_has_dx_dy():
|
|
|
676
673
|
|
|
677
674
|
assert "dx" in df.columns
|
|
678
675
|
assert "dy" in df.columns
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
676
|
+
|
|
677
|
+
dx = df["dx"].to_numpy(dtype=float)
|
|
678
|
+
dy = df["dy"].to_numpy(dtype=float)
|
|
679
|
+
x1 = df["x1_"].to_numpy(dtype=float)
|
|
680
|
+
x2 = df["x2_"].to_numpy(dtype=float)
|
|
681
|
+
y1 = df["y1_"].to_numpy(dtype=float)
|
|
682
|
+
y2 = df["y2_"].to_numpy(dtype=float)
|
|
683
|
+
|
|
684
|
+
assert np.isfinite(dx).all()
|
|
685
|
+
assert np.isfinite(dy).all()
|
|
686
|
+
|
|
687
|
+
np.testing.assert_allclose(dx, x2 - x1)
|
|
688
|
+
np.testing.assert_allclose(dy, y2 - y1)
|
|
684
689
|
|
|
685
690
|
|
|
686
691
|
def test_filter_steps_by_window_removes_large_steps():
|
|
@@ -775,7 +780,7 @@ def test_fit_returns_loss_history(small_params):
|
|
|
775
780
|
optimisers, schedulers = make_optimisers(model)
|
|
776
781
|
history = fit(
|
|
777
782
|
model,
|
|
778
|
-
|
|
783
|
+
image_trim_pixels=3, # number of conv layers (used only for snapshots)
|
|
779
784
|
window_size=H, # spatial crop size (used only for snapshots)
|
|
780
785
|
dl_train=_DL(),
|
|
781
786
|
dl_val=_DL(),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|