vboussange commited on
Commit
77d1c6a
·
verified ·
1 Parent(s): 571446f

Push model using huggingface_hub.

Browse files
Files changed (3) hide show
  1. README.md +6 -93
  2. config.json +448 -0
  3. model.safetensors +3 -0
README.md CHANGED
@@ -1,98 +1,11 @@
1
  ---
2
- license: mit
3
  library_name: muscari
4
  tags:
5
- - ecology
6
- - biodiversity
7
- - species-richness
8
- - species-distribution
9
- - vegetation
10
- - Europe
11
- - geospatial
12
- pretty_name: MuScaRi
13
- pipeline_tag: other
14
  ---
15
 
16
- # Model Card for MuScaRi
17
-
18
- **MuScaRi** (Multi-Scale species Richness estimation, also named after the *Muscari* genus of perennial bulbous plants) is a deep learning model that estimates vascular plant species richness at arbitrary spatial scales from ecological survey data and environmental covariates.
19
-
20
- - **Repository:** https://github.com/vboussange/MuScaRi
21
- - **Paper:** [Multi-scale species richness estimation with deep learning](https://arxiv.org/abs/2507.06358)
22
- - **Training data:** [vboussange/muscari-data](https://huggingface.co/datasets/vboussange/muscari-data)
23
- - **Demo:** [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/vboussange/MuScaRi/blob/master/muscari_demo.ipynb)
24
-
25
- ## Model Description
26
-
27
- MuScaRi composes a fully connected feedforward neural network with a four-parameter Weibull rarefaction model. Given the area of a spatial unit and summary statistics of environmental covariates within it, the neural network predicts the parameters of the rarefaction curve, which in turn predicts expected species richness as a function of sampling effort. Evaluating the curve at infinite sampling effort yields total (asymptotic) species richness predictions.
28
-
29
- The pretrained model is an **ensemble of 5 members**, one per spatial cross-validation fold, trained on ~350k European vegetation plots from the European Vegetation Archive (EVA). Ensemble predictions are aggregated by arithmetic mean; standard deviations quantify prediction uncertainty.
30
-
31
- See the [paper](https://arxiv.org/abs/2507.06358) for full architecture details and benchmarks, and the [`muscari-data` dataset card](https://huggingface.co/datasets/vboussange/muscari-data) for the dataset used during training.
32
-
33
- ## Quick Start
34
-
35
- ```python
36
- from muscari import MuScaRiEnsemble
37
- from muscari.data_processing.utils_features import EnvironmentalFeatureDataset
38
- import pandas as pd
39
-
40
- model = MuScaRiEnsemble.from_pretrained("vboussange/muscari")
41
- print(f"Ensemble with {model.n_models} members")
42
- print("Required features:", model.feature_names)
43
-
44
- # Predict total species richness for a spatial unit
45
- # df must contain columns listed in model.feature_names
46
- df = pd.DataFrame([...]) # one row per spatial unit; see Colab demo for how to build it
47
- sr_mean = model.predict_mean_sr_tot(df) # asymptotic richness
48
- sr_std = model.get_std_sr_tot(df) # ensemble uncertainty
49
- ```
50
-
51
- For an end-to-end walkthrough, see the [Colab demo](https://colab.research.google.com/github/vboussange/MuScaRi/blob/master/muscari_demo.ipynb).
52
-
53
- ## Inputs and Outputs
54
-
55
- **Inputs:**
56
- a `df: pandas.Dataframe` with the following columns (see [Colab demo](https://colab.research.google.com/github/vboussange/MuScaRi/blob/master/muscari_demo.ipynb) for more details)
57
-
58
- | Feature group | Columns | Description |
59
- |---|---|---|
60
- | Spatial unit area | `log_observed_area` | Log of sampling effort (m²); omit for asymptotic prediction |
61
- | Mean environmental conditions | mean of `bio1`, `bio12`, `sfcWind`, `pet`, `elevation` | Mean of CHELSA/EU-DEM variables within the spatial unit |
62
- | Environmental heterogeneity | std of `bio1`, `bio12`, `sfcWind`, `pet`, `elevation` | Std of CHELSA/EU-DEM variables within the spatial unit |
63
-
64
- **Outputs:**
65
-
66
- - `model.predict_mean_sr(df)`: expected species richness at a given sampling effort (interpolation mode)
67
- - `model.predict_mean_sr_tot(df)`: total species richness under asymptotic sampling effort (extrapolation mode)
68
- - `model.get_std_sr_tot(df)`: ensemble standard deviation of the above
69
-
70
- ## Training Data and Evaluation
71
-
72
- Full performance tables are in the [paper](https://arxiv.org/abs/2507.06358).
73
-
74
- ## Limitations
75
-
76
- - Trained on European vascular plants; performance outside Europe is untested.
77
- - Environmental predictors use a 1981-2010 climatological baseline.
78
- - Predictions are less reliable in data-sparse regions (e.g. parts of France, Spain, Scandinavia).
79
-
80
- ## Citation
81
-
82
- ```bibtex
83
- @misc{boussange2025muscari,
84
- title = {Multi-scale species richness estimation with deep learning},
85
- author = {Victor Boussange and Bert Wuyts and Philipp Brun and
86
- Johanna T. Malle and Gabriele Midolo and Jeanne Portier and
87
- Théophile Sanchez and Niklaus E. Zimmermann and
88
- Irena Axmanová and Helge Bruelheide and Milan Chytrý and
89
- Stephan Kambach and Zdeňka Lososová and Martin Večeřa and
90
- Idoia Biurrun and Klaus T. Ecker and Jonathan Lenoir and
91
- Jens-Christian Svenning and Dirk Nikolaus Karger},
92
- year = {2025},
93
- eprint = {2507.06358},
94
- archivePrefix = {arXiv},
95
- primaryClass = {q-bio.PE},
96
- url = {https://arxiv.org/abs/2507.06358},
97
- }
98
- ```
 
1
  ---
 
2
  library_name: muscari
3
  tags:
4
+ - model_hub_mixin
5
+ - pytorch_model_hub_mixin
 
 
 
 
 
 
 
6
  ---
7
 
8
+ This model has been pushed to the Hub using the [PytorchModelHubMixin](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin) integration:
9
+ - Code: [More Information Needed]
10
+ - Paper: [More Information Needed]
11
+ - Docs: [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
config.json ADDED
@@ -0,0 +1,448 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "feature_names": [
3
+ "bio1",
4
+ "pet_penman_mean",
5
+ "sfcWind_mean",
6
+ "bio12",
7
+ "std_bio1",
8
+ "std_pet_penman_mean",
9
+ "std_sfcWind_mean",
10
+ "std_bio12",
11
+ "elevation",
12
+ "std_elevation",
13
+ "log_sp_unit_area"
14
+ ],
15
+ "feature_scalers": [
16
+ {
17
+ "cls": "MinMaxScaler",
18
+ "data_max_": [
19
+ 15.884361267089844,
20
+ 19.202129364013672,
21
+ 138.9114990234375,
22
+ 10.632919311523438,
23
+ 3517.006103515625,
24
+ 6.485342502593994,
25
+ 25.77168083190918,
26
+ 2.8469786643981934,
27
+ 1041.3431396484375,
28
+ 2908.932861328125,
29
+ 994.3865966796875,
30
+ 27.631017684936523
31
+ ],
32
+ "data_min_": [
33
+ 0.0,
34
+ -4.92936372756958,
35
+ 33.97886657714844,
36
+ 0.7180836200714111,
37
+ 305.00048828125,
38
+ 0.0,
39
+ 0.012921497225761414,
40
+ 0.002438093302771449,
41
+ 0.04062916710972786,
42
+ -6.931583404541016,
43
+ 0.0,
44
+ 15.201862335205078
45
+ ],
46
+ "data_range_": [
47
+ 15.884361267089844,
48
+ 24.131492614746094,
49
+ 104.93263244628906,
50
+ 9.914835929870605,
51
+ 3212.005615234375,
52
+ 6.485342502593994,
53
+ 25.758758544921875,
54
+ 2.844540596008301,
55
+ 1041.302490234375,
56
+ 2915.864501953125,
57
+ 994.3865966796875,
58
+ 12.429155349731445
59
+ ],
60
+ "min_": [
61
+ 0.0,
62
+ 0.20427098870277405,
63
+ -0.3238160312175751,
64
+ -0.07242516428232193,
65
+ -0.0949564054608345,
66
+ 0.0,
67
+ -0.000501635076943785,
68
+ -0.0008571131620556116,
69
+ -3.901763921021484e-05,
70
+ 0.002377196680754423,
71
+ 0.0,
72
+ -1.2230808734893799
73
+ ],
74
+ "n_features_in_": 12,
75
+ "scale_": [
76
+ 0.06295499950647354,
77
+ 0.04143962636590004,
78
+ 0.009529924020171165,
79
+ 0.10085895657539368,
80
+ 0.0003113319689873606,
81
+ 0.15419386327266693,
82
+ 0.0388217456638813,
83
+ 0.3515506088733673,
84
+ 0.000960335717536509,
85
+ 0.00034295147634111345,
86
+ 0.0010056451428681612,
87
+ 0.08045598864555359
88
+ ]
89
+ },
90
+ {
91
+ "cls": "MinMaxScaler",
92
+ "data_max_": [
93
+ 15.843147277832031,
94
+ 19.20088005065918,
95
+ 139.17771911621094,
96
+ 10.947614669799805,
97
+ 3342.95263671875,
98
+ 6.469884395599365,
99
+ 24.22772216796875,
100
+ 2.978724479675293,
101
+ 1162.36328125,
102
+ 3047.372314453125,
103
+ 992.4478149414062,
104
+ 27.6309871673584
105
+ ],
106
+ "data_min_": [
107
+ 0.0,
108
+ -6.05493688583374,
109
+ 34.17231369018555,
110
+ 0.7988338470458984,
111
+ 284.1519470214844,
112
+ 0.0,
113
+ 0.010869947262108326,
114
+ 0.004524758085608482,
115
+ 0.013255664147436619,
116
+ -6.974416255950928,
117
+ 0.0,
118
+ 15.20180606842041
119
+ ],
120
+ "data_range_": [
121
+ 15.843147277832031,
122
+ 25.255817413330078,
123
+ 105.00540161132812,
124
+ 10.148780822753906,
125
+ 3058.80078125,
126
+ 6.469884395599365,
127
+ 24.21685218811035,
128
+ 2.9741997718811035,
129
+ 1162.3499755859375,
130
+ 3054.3466796875,
131
+ 992.4478149414062,
132
+ 12.429181098937988
133
+ ],
134
+ "min_": [
135
+ 0.0,
136
+ 0.23974423110485077,
137
+ -0.3254338800907135,
138
+ -0.07871229946613312,
139
+ -0.09289652109146118,
140
+ 0.0,
141
+ -0.00044885880197398365,
142
+ -0.0015213362639769912,
143
+ -1.1404194083297625e-05,
144
+ 0.002283439738675952,
145
+ 0.0,
146
+ -1.2230738401412964
147
+ ],
148
+ "n_features_in_": 12,
149
+ "scale_": [
150
+ 0.06311877071857452,
151
+ 0.03959483653306961,
152
+ 0.009523320011794567,
153
+ 0.0985340029001236,
154
+ 0.00032692551030777395,
155
+ 0.15456226468086243,
156
+ 0.04129355773329735,
157
+ 0.33622488379478455,
158
+ 0.0008603261085227132,
159
+ 0.0003274022601544857,
160
+ 0.0010076096514239907,
161
+ 0.08045582473278046
162
+ ]
163
+ },
164
+ {
165
+ "cls": "MinMaxScaler",
166
+ "data_max_": [
167
+ 15.886514663696289,
168
+ 19.208925247192383,
169
+ 142.9532928466797,
170
+ 10.431619644165039,
171
+ 3432.67919921875,
172
+ 6.512694835662842,
173
+ 25.317461013793945,
174
+ 2.8370885848999023,
175
+ 1105.497314453125,
176
+ 2948.165283203125,
177
+ 996.5736694335938,
178
+ 27.631013870239258
179
+ ],
180
+ "data_min_": [
181
+ 0.0,
182
+ -5.62136173248291,
183
+ 33.247920989990234,
184
+ 0.7645986676216125,
185
+ 306.2086181640625,
186
+ 0.0,
187
+ 0.010618088766932487,
188
+ 0.0022086116950958967,
189
+ 0.013255664147436619,
190
+ -7.108325481414795,
191
+ 0.0,
192
+ 15.201883316040039
193
+ ],
194
+ "data_range_": [
195
+ 15.886514663696289,
196
+ 24.83028793334961,
197
+ 109.70536804199219,
198
+ 9.667020797729492,
199
+ 3126.470703125,
200
+ 6.512694835662842,
201
+ 25.306842803955078,
202
+ 2.8348798751831055,
203
+ 1105.4840087890625,
204
+ 2955.273681640625,
205
+ 996.5736694335938,
206
+ 12.429130554199219
207
+ ],
208
+ "min_": [
209
+ 0.0,
210
+ 0.22639131546020508,
211
+ -0.30306559801101685,
212
+ -0.07909351587295532,
213
+ -0.09794066101312637,
214
+ 0.0,
215
+ -0.00041957382927648723,
216
+ -0.0007790847448632121,
217
+ -1.1990823622909375e-05,
218
+ 0.0024053019005805254,
219
+ 0.0,
220
+ -1.2230850458145142
221
+ ],
222
+ "n_features_in_": 12,
223
+ "scale_": [
224
+ 0.06294646859169006,
225
+ 0.04027339443564415,
226
+ 0.009115324355661869,
227
+ 0.10344448685646057,
228
+ 0.0003198494669049978,
229
+ 0.1535462737083435,
230
+ 0.03951500356197357,
231
+ 0.3527486324310303,
232
+ 0.0009045811602845788,
233
+ 0.00033837812952697277,
234
+ 0.0010034381411969662,
235
+ 0.08045615255832672
236
+ ]
237
+ },
238
+ {
239
+ "cls": "MinMaxScaler",
240
+ "data_max_": [
241
+ 15.892108917236328,
242
+ 19.225000381469727,
243
+ 138.10855102539062,
244
+ 10.26804256439209,
245
+ 3565.4345703125,
246
+ 6.537107944488525,
247
+ 25.24667739868164,
248
+ 2.9901700019836426,
249
+ 1012.9049682617188,
250
+ 2916.74609375,
251
+ 998.977294921875,
252
+ 27.630943298339844
253
+ ],
254
+ "data_min_": [
255
+ 0.0,
256
+ -5.0402984619140625,
257
+ 34.54750061035156,
258
+ 0.7479619979858398,
259
+ 286.7718811035156,
260
+ 0.0,
261
+ 0.010618088766932487,
262
+ 0.0032483888790011406,
263
+ 0.013255664147436619,
264
+ -7.108325481414795,
265
+ 0.0,
266
+ 15.201833724975586
267
+ ],
268
+ "data_range_": [
269
+ 15.892108917236328,
270
+ 24.26529884338379,
271
+ 103.56105041503906,
272
+ 9.52008056640625,
273
+ 3278.66259765625,
274
+ 6.537107944488525,
275
+ 25.236059188842773,
276
+ 2.986921548843384,
277
+ 1012.8917236328125,
278
+ 2923.8544921875,
279
+ 998.977294921875,
280
+ 12.429109573364258
281
+ ],
282
+ "min_": [
283
+ 0.0,
284
+ 0.20771631598472595,
285
+ -0.33359548449516296,
286
+ -0.078566774725914,
287
+ -0.08746611326932907,
288
+ 0.0,
289
+ -0.0004207506717648357,
290
+ -0.0010875373845919967,
291
+ -1.3086951184959617e-05,
292
+ 0.0024311488959938288,
293
+ 0.0,
294
+ -1.2230831384658813
295
+ ],
296
+ "n_features_in_": 12,
297
+ "scale_": [
298
+ 0.06292431056499481,
299
+ 0.04121111333370209,
300
+ 0.009656139649450779,
301
+ 0.10504113137722015,
302
+ 0.00030500240973196924,
303
+ 0.15297284722328186,
304
+ 0.03962583839893341,
305
+ 0.3347928524017334,
306
+ 0.0009872723603621125,
307
+ 0.0003420142747927457,
308
+ 0.0010010238038375974,
309
+ 0.08045628666877747
310
+ ]
311
+ },
312
+ {
313
+ "cls": "MinMaxScaler",
314
+ "data_max_": [
315
+ 15.827322959899902,
316
+ 19.24164390563965,
317
+ 135.46925354003906,
318
+ 10.365579605102539,
319
+ 3569.140869140625,
320
+ 6.496120929718018,
321
+ 25.69937515258789,
322
+ 2.7845206260681152,
323
+ 1086.6605224609375,
324
+ 2914.540771484375,
325
+ 967.4793090820312,
326
+ 27.63096809387207
327
+ ],
328
+ "data_min_": [
329
+ 0.0,
330
+ -4.978337287902832,
331
+ 33.97886657714844,
332
+ 0.7802224159240723,
333
+ 309.584716796875,
334
+ 0.0,
335
+ 0.010618088766932487,
336
+ 0.0027105531189590693,
337
+ 0.09874647110700607,
338
+ -7.108325481414795,
339
+ 0.0,
340
+ 15.201906204223633
341
+ ],
342
+ "data_range_": [
343
+ 15.827322959899902,
344
+ 24.219982147216797,
345
+ 101.49038696289062,
346
+ 9.585357666015625,
347
+ 3259.55615234375,
348
+ 6.496120929718018,
349
+ 25.688756942749023,
350
+ 2.7818100452423096,
351
+ 1086.561767578125,
352
+ 2921.649169921875,
353
+ 967.4793090820312,
354
+ 12.429061889648438
355
+ ],
356
+ "min_": [
357
+ 0.0,
358
+ 0.20554670691490173,
359
+ -0.3347988724708557,
360
+ -0.08139731734991074,
361
+ -0.09497756510972977,
362
+ 0.0,
363
+ -0.00041333603439852595,
364
+ -0.0009743847185745835,
365
+ -9.087975922739133e-05,
366
+ 0.0024329840671271086,
367
+ 0.0,
368
+ -1.2230935096740723
369
+ ],
370
+ "n_features_in_": 12,
371
+ "scale_": [
372
+ 0.06318187713623047,
373
+ 0.04128822311758995,
374
+ 0.009853149764239788,
375
+ 0.1043257862329483,
376
+ 0.00030679022893309593,
377
+ 0.15393802523612976,
378
+ 0.03892753645777702,
379
+ 0.3594781756401062,
380
+ 0.000920334248803556,
381
+ 0.0003422724548727274,
382
+ 0.0010336138075217605,
383
+ 0.08045659214258194
384
+ ]
385
+ }
386
+ ],
387
+ "layer_sizes": [
388
+ 128,
389
+ 512,
390
+ 2048,
391
+ 2048,
392
+ 512,
393
+ 128
394
+ ],
395
+ "n_models": 5,
396
+ "target_scalers": [
397
+ {
398
+ "cls": "MaxAbsScaler",
399
+ "max_abs_": [
400
+ 4755.0
401
+ ],
402
+ "n_features_in_": 1,
403
+ "scale_": [
404
+ 4755.0
405
+ ]
406
+ },
407
+ {
408
+ "cls": "MaxAbsScaler",
409
+ "max_abs_": [
410
+ 4772.0
411
+ ],
412
+ "n_features_in_": 1,
413
+ "scale_": [
414
+ 4772.0
415
+ ]
416
+ },
417
+ {
418
+ "cls": "MaxAbsScaler",
419
+ "max_abs_": [
420
+ 4864.0
421
+ ],
422
+ "n_features_in_": 1,
423
+ "scale_": [
424
+ 4864.0
425
+ ]
426
+ },
427
+ {
428
+ "cls": "MaxAbsScaler",
429
+ "max_abs_": [
430
+ 4725.0
431
+ ],
432
+ "n_features_in_": 1,
433
+ "scale_": [
434
+ 4725.0
435
+ ]
436
+ },
437
+ {
438
+ "cls": "MaxAbsScaler",
439
+ "max_abs_": [
440
+ 4701.0
441
+ ],
442
+ "n_features_in_": 1,
443
+ "scale_": [
444
+ 4701.0
445
+ ]
446
+ }
447
+ ]
448
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:be3792b5290693a8f9102ac26f5107c0ce12398eba06a9a6355116c86ee06419
3
+ size 129054112