pysits 2.0.0.dev1__tar.gz → 2.0.0.dev2__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.
Files changed (219) hide show
  1. pysits-2.0.0.dev2/.claude/settings.local.json +8 -0
  2. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/PKG-INFO +1 -1
  3. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pyproject.toml +1 -1
  4. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/__init__.py +29 -12
  5. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/conversions/tibble.py +2 -1
  6. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/impute_linear.md +2 -1
  7. pysits-2.0.0.dev1/pysits/docs/content/impute_median.md → pysits-2.0.0.dev2/pysits/docs/content/impute_mean.md +2 -2
  8. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/impute_mean_window.md +3 -3
  9. pysits-2.0.0.dev2/pysits/docs/content/impute_median.md +9 -0
  10. pysits-2.0.0.dev2/pysits/docs/content/plot.md +117 -0
  11. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_accuracy.md +21 -20
  12. pysits-2.0.0.dev2/pysits/docs/content/sits_accuracy_summary.md +11 -0
  13. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_add_base_cube.md +1 -1
  14. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_apply.md +24 -26
  15. pysits-2.0.0.dev2/pysits/docs/content/sits_as_geopandas.md +28 -0
  16. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_barlow_twins.md +17 -19
  17. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_bbox.md +6 -6
  18. pysits-2.0.0.dev2/pysits/docs/content/sits_classify.md +88 -0
  19. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_cluster_dendro.md +15 -14
  20. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_cluster_frequency.md +1 -1
  21. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_colors_qgis.md +3 -1
  22. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_colors_show.md +2 -0
  23. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_combine_predictions.md +2 -1
  24. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_confidence_sampling.md +2 -1
  25. pysits-2.0.0.dev2/pysits/docs/content/sits_config.md +29 -0
  26. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_config_user_file.md +1 -2
  27. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_contrastive_learning.md +11 -11
  28. pysits-2.0.0.dev2/pysits/docs/content/sits_cube.md +80 -0
  29. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_cube_copy.md +17 -14
  30. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_encode.md +21 -24
  31. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_formula_logref.md +5 -5
  32. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_geo_dist.md +3 -2
  33. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_get_class.md +4 -5
  34. pysits-2.0.0.dev2/pysits/docs/content/sits_get_data.md +57 -0
  35. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_get_probs.md +5 -7
  36. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_kfold_validate.md +7 -6
  37. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_label_classification.md +13 -14
  38. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_labels.md +4 -4
  39. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_labels_summary.md +2 -2
  40. pysits-2.0.0.dev2/pysits/docs/content/sits_lightgbm.md +48 -0
  41. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_lighttae.md +13 -12
  42. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_list_collections.md +1 -1
  43. pysits-2.0.0.dev2/pysits/docs/content/sits_lstm_fcn.md +76 -0
  44. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_merge.md +7 -7
  45. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_mixture_model.md +8 -8
  46. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_mlp.md +20 -20
  47. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_model_export.md +3 -3
  48. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_mosaic.md +29 -25
  49. pysits-2.0.0.dev2/pysits/docs/content/sits_parallel.md +52 -0
  50. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_patterns.md +1 -1
  51. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_pre_train.md +5 -5
  52. pysits-2.0.0.dev2/pysits/docs/content/sits_pred_features.md +21 -0
  53. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_pred_normalize.md +3 -3
  54. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_pred_sample.md +1 -1
  55. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_predictors.md +1 -1
  56. pysits-2.0.0.dev2/pysits/docs/content/sits_random_sampling.md +30 -0
  57. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_reclassify.md +35 -41
  58. pysits-2.0.0.dev2/pysits/docs/content/sits_reduce.md +62 -0
  59. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_reduce_imbalance.md +2 -2
  60. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_regularize.md +11 -11
  61. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_resnet.md +4 -4
  62. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_roi_to_tiles.md +5 -5
  63. pysits-2.0.0.dev2/pysits/docs/content/sits_sample.md +27 -0
  64. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_sampling_design.md +3 -5
  65. pysits-2.0.0.dev2/pysits/docs/content/sits_sankey.md +60 -0
  66. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_segment.md +4 -5
  67. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_select.md +7 -10
  68. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_show_prediction.md +1 -1
  69. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_slic.md +13 -13
  70. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_smooth.md +3 -3
  71. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_snic.md +9 -9
  72. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_som_evaluate_cluster.md +1 -2
  73. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_som_map.md +20 -21
  74. pysits-2.0.0.dev2/pysits/docs/content/sits_som_remove_samples.md +28 -0
  75. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_ssl_lejepa.md +6 -6
  76. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_ssl_mae.md +20 -17
  77. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_ssl_vicreg.md +25 -30
  78. pysits-2.0.0.dev2/pysits/docs/content/sits_stats.md +20 -0
  79. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_stratified_sampling.md +9 -8
  80. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_svm.md +11 -10
  81. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_tae.md +1 -2
  82. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_tempcnn.md +13 -9
  83. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_texture.md +9 -7
  84. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_tiles_to_roi.md +4 -4
  85. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_timeline.md +4 -3
  86. pysits-2.0.0.dev2/pysits/docs/content/sits_timeseries_to_csv.md +23 -0
  87. pysits-2.0.0.dev2/pysits/docs/content/sits_to_csv.md +22 -0
  88. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_to_xlsx.md +7 -7
  89. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_tuning.md +2 -2
  90. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_tuning_hparams.md +2 -2
  91. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_uncertainty_sampling.md +7 -5
  92. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_validate.md +3 -3
  93. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_variance.md +7 -7
  94. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_view.md +9 -12
  95. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_xgboost.md +8 -8
  96. pysits-2.0.0.dev2/pysits/docs/content/summary.md +42 -0
  97. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/models/data/frame.py +16 -0
  98. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/data.py +30 -1
  99. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/exporters/__init__.py +2 -1
  100. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/exporters/files.py +6 -0
  101. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/ml.py +10 -6
  102. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/ts.py +12 -6
  103. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/visualization.py +9 -0
  104. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/visualization/base.py +8 -1
  105. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/tests/conftest.py +48 -0
  106. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/tests/test_classification.py +13 -14
  107. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/tests/test_cube.py +57 -12
  108. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/tests/test_data.py +7 -27
  109. pysits-2.0.0.dev2/tests/test_embedding.py +251 -0
  110. pysits-2.0.0.dev2/tests/test_exporters.py +96 -0
  111. pysits-2.0.0.dev1/tests/test_geopandas.py → pysits-2.0.0.dev2/tests/test_exporters_geopandas.py +3 -17
  112. pysits-2.0.0.dev1/tests/test_xarray.py → pysits-2.0.0.dev2/tests/test_exporters_xarray.py +14 -27
  113. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/tests/test_ml_models.py +41 -2
  114. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/tests/test_rl_models.py +36 -0
  115. pysits-2.0.0.dev2/tests/test_som.py +103 -0
  116. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/tests/test_visualization.py +87 -19
  117. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/uv.lock +1 -1
  118. pysits-2.0.0.dev1/pysits/docs/content/impute_mean.md +0 -9
  119. pysits-2.0.0.dev1/pysits/docs/content/plot.md +0 -112
  120. pysits-2.0.0.dev1/pysits/docs/content/sits_accuracy_summary.md +0 -11
  121. pysits-2.0.0.dev1/pysits/docs/content/sits_as_geopandas.md +0 -28
  122. pysits-2.0.0.dev1/pysits/docs/content/sits_classify.md +0 -107
  123. pysits-2.0.0.dev1/pysits/docs/content/sits_config.md +0 -28
  124. pysits-2.0.0.dev1/pysits/docs/content/sits_cube.md +0 -97
  125. pysits-2.0.0.dev1/pysits/docs/content/sits_get_data.md +0 -80
  126. pysits-2.0.0.dev1/pysits/docs/content/sits_lightgbm.md +0 -42
  127. pysits-2.0.0.dev1/pysits/docs/content/sits_parallel.md +0 -38
  128. pysits-2.0.0.dev1/pysits/docs/content/sits_pred_features.md +0 -21
  129. pysits-2.0.0.dev1/pysits/docs/content/sits_reduce.md +0 -63
  130. pysits-2.0.0.dev1/pysits/docs/content/sits_sample.md +0 -27
  131. pysits-2.0.0.dev1/pysits/docs/content/sits_stats.md +0 -21
  132. pysits-2.0.0.dev1/pysits/docs/content/sits_to_csv.md +0 -23
  133. pysits-2.0.0.dev1/pysits/docs/content/summary.md +0 -36
  134. pysits-2.0.0.dev1/pysits/sits/classification.py +0 -42
  135. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/.gitattributes +0 -0
  136. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/.github/workflows/ruff.yaml +0 -0
  137. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/.gitignore +0 -0
  138. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/.pre-commit-config.yaml +0 -0
  139. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/LICENSE +0 -0
  140. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/README.md +0 -0
  141. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/conda/meta.yaml +0 -0
  142. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/backend/__init__.py +0 -0
  143. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/backend/functions.py +0 -0
  144. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/backend/loaders.py +0 -0
  145. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/backend/pkgs.py +0 -0
  146. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/conversions/__init__.py +0 -0
  147. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/conversions/clojure.py +0 -0
  148. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/conversions/common.py +0 -0
  149. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/conversions/decorators.py +0 -0
  150. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/conversions/dsl/__init__.py +0 -0
  151. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/conversions/dsl/base.py +0 -0
  152. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/conversions/dsl/mask.py +0 -0
  153. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/conversions/dsl/tuning.py +0 -0
  154. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/conversions/stac.py +0 -0
  155. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/conversions/vector.py +0 -0
  156. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/conversions/xarray.py +0 -0
  157. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/__init__.py +0 -0
  158. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_bands.md +0 -0
  159. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_clean.md +0 -0
  160. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_cluster_clean.md +0 -0
  161. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_colors.md +0 -0
  162. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_colors_reset.md +0 -0
  163. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_colors_set.md +0 -0
  164. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_config_show.md +0 -0
  165. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_formula_linear.md +0 -0
  166. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_pred_references.md +0 -0
  167. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_rfor.md +0 -0
  168. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_som_clean_samples.md +0 -0
  169. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_train.md +0 -0
  170. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/content/sits_uncertainty.md +0 -0
  171. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/docs/decorators.py +0 -0
  172. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/extras/__init__.py +0 -0
  173. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/extras/earthdatalogin.py +0 -0
  174. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/extras/torch.py +0 -0
  175. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/jinja.py +0 -0
  176. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/models/__init__.py +0 -0
  177. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/models/base.py +0 -0
  178. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/models/data/__init__.py +0 -0
  179. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/models/data/accuracy.py +0 -0
  180. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/models/data/base.py +0 -0
  181. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/models/data/cube.py +0 -0
  182. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/models/data/frame_accessor.py +0 -0
  183. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/models/data/matrix.py +0 -0
  184. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/models/data/table.py +0 -0
  185. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/models/data/ts.py +0 -0
  186. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/models/data/tuning.py +0 -0
  187. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/models/data/vector.py +0 -0
  188. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/models/frame.py +0 -0
  189. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/models/ml.py +0 -0
  190. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/models/resolver.py +0 -0
  191. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/settings.py +0 -0
  192. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/__init__.py +0 -0
  193. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/colors.py +0 -0
  194. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/config.py +0 -0
  195. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/context.py +0 -0
  196. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/cube.py +0 -0
  197. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/exporters/sf.py +0 -0
  198. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/exporters/xarray.py +0 -0
  199. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/impute.py +0 -0
  200. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/segment.py +0 -0
  201. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/tiles.py +0 -0
  202. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/tuning.py +0 -0
  203. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/sits/utils.py +0 -0
  204. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/templates/cube.html +0 -0
  205. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/templates/tuning.html +0 -0
  206. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/visualization/__init__.py +0 -0
  207. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/visualization/image.py +0 -0
  208. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/visualization/leaflet.py +0 -0
  209. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/pysits/visualization/tmap.py +0 -0
  210. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/tests/test_config.py +0 -0
  211. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/tests/test_conversions.py +0 -0
  212. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/tests/test_dsl.py +0 -0
  213. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/tests/test_extras.py +0 -0
  214. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/tests/test_indexing.py +0 -0
  215. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/tests/test_resolver.py +0 -0
  216. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/tests/test_tiles.py +0 -0
  217. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/tests/test_tuning.py +0 -0
  218. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/tests/test_utils.py +0 -0
  219. {pysits-2.0.0.dev1 → pysits-2.0.0.dev2}/tests/test_validation.py +0 -0
@@ -0,0 +1,8 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(Rscript -e 'cat\\(length\\(getNamespaceExports\\(\"sits\"\\)\\), \"\\\\n\"\\)')",
5
+ "Bash(uv run python -c ' *)"
6
+ ]
7
+ }
8
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pysits
3
- Version: 2.0.0.dev1
3
+ Version: 2.0.0.dev2
4
4
  Summary: Python wrapper for the sits R package
5
5
  Project-URL: Homepage, https://github.com/e-sensing/pysits
6
6
  Project-URL: Issue Tracker, https://github.com/e-sensing/pysits/issues
@@ -17,7 +17,7 @@
17
17
 
18
18
  [project]
19
19
  name = "pysits"
20
- version = "2.0.0.dev1"
20
+ version = "2.0.0.dev2"
21
21
  description = "Python wrapper for the sits R package"
22
22
  readme = "README.md"
23
23
  requires-python = ">=3.10,<4"
@@ -20,7 +20,6 @@
20
20
  from .conversions.dsl.mask import MaskValue
21
21
  from .conversions.dsl.tuning import hparam
22
22
  from .settings import __version__
23
- from .sits.classification import sits_classify, sits_label_classification, sits_smooth
24
23
  from .sits.colors import (
25
24
  sits_colors,
26
25
  sits_colors_reset,
@@ -62,6 +61,9 @@ from .sits.data import (
62
61
  sits_apply,
63
62
  sits_bands,
64
63
  sits_bbox,
64
+ sits_classify,
65
+ sits_encode,
66
+ sits_label_classification,
65
67
  sits_labels,
66
68
  sits_labels_summary,
67
69
  sits_list_collections,
@@ -69,10 +71,17 @@ from .sits.data import (
69
71
  sits_mixture_model,
70
72
  sits_reduce,
71
73
  sits_select,
74
+ sits_smooth,
72
75
  sits_timeline,
73
76
  )
74
77
  from .sits.data import sits_summary as summary
75
- from .sits.exporters import sits_as_geopandas, sits_as_xarray, sits_to_csv, sits_to_xlsx
78
+ from .sits.exporters import (
79
+ sits_as_geopandas,
80
+ sits_as_xarray,
81
+ sits_timeseries_to_csv,
82
+ sits_to_csv,
83
+ sits_to_xlsx,
84
+ )
76
85
  from .sits.impute import (
77
86
  impute_linear,
78
87
  impute_mean,
@@ -87,6 +96,7 @@ from .sits.ml import (
87
96
  sits_kfold_validate,
88
97
  sits_lightgbm,
89
98
  sits_lighttae,
99
+ sits_lstm_fcn,
90
100
  sits_mlp,
91
101
  sits_model_export,
92
102
  sits_pre_train,
@@ -107,7 +117,6 @@ from .sits.ts import (
107
117
  sits_cluster_clean,
108
118
  sits_cluster_dendro,
109
119
  sits_cluster_frequency,
110
- sits_encode,
111
120
  sits_geo_dist,
112
121
  sits_get_class,
113
122
  sits_get_data,
@@ -118,6 +127,7 @@ from .sits.ts import (
118
127
  sits_pred_references,
119
128
  sits_pred_sample,
120
129
  sits_predictors,
130
+ sits_random_sampling,
121
131
  sits_reduce_imbalance,
122
132
  sits_sample,
123
133
  sits_sampling_design,
@@ -125,6 +135,7 @@ from .sits.ts import (
125
135
  sits_som_clean_samples,
126
136
  sits_som_evaluate_cluster,
127
137
  sits_som_map,
138
+ sits_som_remove_samples,
128
139
  sits_stats,
129
140
  sits_stratified_sampling,
130
141
  sits_validate,
@@ -137,13 +148,21 @@ from .sits.utils import (
137
148
  read_rds,
138
149
  )
139
150
  from .sits.visualization import sits_plot as plot
140
- from .sits.visualization import sits_view
151
+ from .sits.visualization import sits_sankey, sits_view
141
152
 
142
153
  __all__ = (
143
154
  # Classification
144
155
  "sits_classify",
145
156
  "sits_smooth",
146
157
  "sits_label_classification",
158
+ # Embeddings
159
+ "sits_pre_train",
160
+ "sits_encode",
161
+ "sits_ssl_mae",
162
+ "sits_ssl_lejepa",
163
+ "sits_ssl_vicreg",
164
+ "sits_barlow_twins",
165
+ "sits_contrastive_learning",
147
166
  # Cube
148
167
  "sits_cube",
149
168
  "sits_clean",
@@ -170,7 +189,7 @@ __all__ = (
170
189
  "sits_config_user_file",
171
190
  "sits_config_value",
172
191
  "sits_parallel",
173
- # Data management
192
+ # Data
174
193
  "sits_bands",
175
194
  "sits_timeline",
176
195
  "sits_labels",
@@ -194,6 +213,7 @@ __all__ = (
194
213
  "sits_resnet",
195
214
  "sits_tempcnn",
196
215
  "sits_lighttae",
216
+ "sits_lstm_fcn",
197
217
  "sits_svm",
198
218
  "sits_xgboost",
199
219
  "sits_lightgbm",
@@ -202,12 +222,6 @@ __all__ = (
202
222
  "sits_model_export",
203
223
  "sits_formula_linear",
204
224
  "sits_formula_logref",
205
- "sits_ssl_mae",
206
- "sits_ssl_lejepa",
207
- "sits_ssl_vicreg",
208
- "sits_barlow_twins",
209
- "sits_contrastive_learning",
210
- "sits_pre_train",
211
225
  # Impute
212
226
  "impute_linear",
213
227
  "impute_mean",
@@ -228,13 +242,14 @@ __all__ = (
228
242
  "sits_som_map",
229
243
  "sits_som_evaluate_cluster",
230
244
  "sits_som_clean_samples",
245
+ "sits_som_remove_samples",
231
246
  "sits_geo_dist",
232
247
  "sits_patterns",
233
248
  "sits_sample",
234
249
  "sits_reduce_imbalance",
235
250
  "sits_sampling_design",
236
251
  "sits_stratified_sampling",
237
- "sits_encode",
252
+ "sits_random_sampling",
238
253
  # Tiles
239
254
  "sits_tiles_to_roi",
240
255
  "sits_roi_to_tiles",
@@ -249,12 +264,14 @@ __all__ = (
249
264
  "sits_as_xarray",
250
265
  "sits_as_geopandas",
251
266
  "sits_to_xlsx",
267
+ "sits_timeseries_to_csv",
252
268
  # Tuning
253
269
  "sits_tuning_hparams",
254
270
  "sits_tuning",
255
271
  # Visualization
256
272
  "plot",
257
273
  "sits_view",
274
+ "sits_sankey",
258
275
  # DSL Variables
259
276
  "MaskValue",
260
277
  "hparam",
@@ -480,7 +480,8 @@ def geopandas_to_tibble(data: GeoPandasDataFrame) -> RDataFrame:
480
480
  f"Warning: Dropping columns with embedded DataFrames: {dropped_columns}"
481
481
  )
482
482
 
483
- data_safe = data[safe_columns].copy()
483
+ # Geometries are transferred as WKT, so the result is a plain data frame
484
+ data_safe = PandasDataFrame(data[safe_columns].copy())
484
485
 
485
486
  if isinstance(data, GeoPandasDataFrame):
486
487
  geom_col = data.geometry.name
@@ -3,7 +3,8 @@ Replace NA values by linear interpolation
3
3
  Remove NA by linear interpolation
4
4
 
5
5
  Args:
6
- data (list | pandas.DataFrame): A time series vector or matrix.
6
+ data (list): A time series vector or matrix.
7
7
 
8
8
  Returns:
9
9
  R: A set of filtered time series using the imputation function.
10
+
@@ -1,6 +1,6 @@
1
- Remove NA using median
1
+ Remove NA using mean
2
2
 
3
- Remove NA using median
3
+ Remove NA using mean
4
4
 
5
5
  Args:
6
6
  data (list[float] | SITSMatrix): A time series vector or matrix.
@@ -3,14 +3,14 @@ Remove NA using weighted moving average
3
3
  Remove NA using weighted moving average
4
4
 
5
5
  Args:
6
- data (list): A time series vector or matrix.
6
+ data (list[float]): A time series vector or matrix.
7
7
  k (int): Width of the moving average window. Expands to both sides
8
8
  of the center element e.g. k = 2 means 4 observations (2 left,
9
9
  2 right) are taken into account. If all observations in the
10
10
  current window are NA, the window size is automatically
11
11
  increased until there are at least 2 non-NA values present.
12
- weighting (str): The weighting strategy to be used. More details
13
- below (default is "simple").
12
+ weighting (str): Weighting strategy to be used. More details below
13
+ (default is "simple").
14
14
 
15
15
  Returns:
16
16
  R: A set of filtered time series using the imputation function.
@@ -0,0 +1,9 @@
1
+ Remove NA using median
2
+
3
+ Remove NA using median
4
+
5
+ Args:
6
+ data (list | SITSMatrix): A time series vector or matrix.
7
+
8
+ Returns:
9
+ R: A set of filtered time series using the imputation function.
@@ -0,0 +1,117 @@
1
+ Plot sits objects.
2
+
3
+ A single dispatching function that produces a plot appropriate to the type
4
+ of the object passed as `x`. It covers data cubes (raster, SAR, DEM,
5
+ vector), probability and uncertainty products, variance cubes, patterns,
6
+ time-series predictions, embeddings, clustering and SOM outputs, accuracy
7
+ tables, and trained models. Depending on the object type, the plot is
8
+ rendered as a map, a chart, or a raster image.
9
+
10
+ The accepted keyword arguments depend on the type of `x`. The sections
11
+ below group the parameters by the kind of object being plotted.
12
+
13
+ Args:
14
+ x (SITSCubeModel | SITSTimeSeriesModel | SITSTimeSeriesPatternsModel | SITSMachineLearningMethod | SITSConfusionMatrix):
15
+ Object to be plotted. Supported kinds include raster, SAR, DEM,
16
+ and vector cubes; classified, probability, uncertainty, and
17
+ variance cubes; patterns; time-series and embedding predictions;
18
+ geographic distances; clustering and SOM outputs; accuracy
19
+ tables; t-SNE projections; and trained models.
20
+ y: Ignored. Present for compatibility with the generic `plot`.
21
+ band (str): For raster, SAR, DEM, and vector cubes, the band used to
22
+ plot a grey (B/W) image. For SOM maps, the band to be plotted.
23
+ red (str): Band assigned to the red channel for RGB plots of raster,
24
+ SAR, and vector cubes.
25
+ green (str): Band assigned to the green channel for RGB plots.
26
+ blue (str): Band assigned to the blue channel for RGB plots.
27
+ tile (str): Tile to be plotted (for cube objects).
28
+ dates (list[str]): Dates to be plotted (raster, SAR, and vector
29
+ cubes).
30
+ roi (dict): Spatial extent (region of interest) to plot, in WGS 84.
31
+ See notes.
32
+ labels (list[str]): Labels to plot (probability, variance, and vector
33
+ cubes).
34
+ bands (list[str]): Bands to be viewed (for patterns and time-series
35
+ predictions).
36
+ legend (dict): Maps labels to colors (class cubes, SOM maps, and
37
+ cluster confusion plots).
38
+ legend_position (str): Where to place the legend. Typical default is
39
+ `"inside"` for RGB/grey plots and `"outside"` for classified and
40
+ probability maps.
41
+ legend_title (str): Title of the legend for probability and variance
42
+ cubes (for example `"probs"` or `"logvar"`).
43
+ palette (str): An `RColorBrewer` or `cols4all` palette. For
44
+ chart-based plots (predictions, embeddings, clusters, t-SNE), an
45
+ HCL palette name.
46
+ rev (bool): Whether to reverse the color order in the palette.
47
+ scale (float): Relative scale (roughly 0.4 to 1.0) of the plot text
48
+ and map.
49
+ quantile (float): Minimum quantile to plot (probability and variance
50
+ cubes).
51
+ first_quantile (float): First quantile used for stretching images.
52
+ last_quantile (float): Last quantile used for stretching images.
53
+ max_cog_size (int): Maximum size of COG (Cloud Optimized GeoTIFF)
54
+ overviews, in lines/columns (pixels).
55
+ seg_color (str): Color used for segment borders in vector cubes.
56
+ line_width (float): Line width used for segment borders in vector
57
+ cubes.
58
+ type (str): Type of plot. For accuracy objects, either
59
+ `"confusion_matrix"` or `"metrics"`. For variance cubes, `"map"`
60
+ or `"hist"`. For SOM maps, `"codes"` (neuron weight time series)
61
+ or `"mapping"` (number of samples per neuron).
62
+ year_grid (bool): For patterns, whether to plot a grid of panels
63
+ using labels as columns and years as rows (default `False`).
64
+ cluster: For clustering plots, the cluster object produced by
65
+ `sits_cluster_dendro`.
66
+ cutree_height (float): For clustering plots, the height at which to
67
+ draw a dashed horizontal line indicating where the dendrogram is
68
+ cut.
69
+ name_cluster (str): For SOM cluster evaluation, the cluster to plot.
70
+ title (str): For SOM cluster evaluation, the title of the plot.
71
+ tree_idx (int): For XGBoost models, the index of the tree to be
72
+ plotted.
73
+ plot_embedding (str): For embedding predictions, either `"none"` (plot
74
+ only the predicted class intervals) or `"area"` (overlay a
75
+ smoothed vertical embedding profile per year).
76
+ stretch (list[float]): For embedding predictions, the lower and upper
77
+ quantiles used to stretch embedding values before plotting
78
+ (default `[0.02, 0.98]`).
79
+ class_alpha (float): For embedding predictions, transparency of the
80
+ class polygons in `[0, 1]` (default `0.7`).
81
+ area_alpha (float): For embedding predictions, transparency of the
82
+ embedding area in `[0, 1]` (default `0.25`).
83
+ area_width (float): For embedding predictions, the horizontal width
84
+ fraction of the embedding area along the time axis.
85
+ area_spar (float): For embedding predictions, the smoothing parameter
86
+ passed to the spline fit (default `0.6`); higher values produce
87
+ smoother profiles.
88
+ **kwargs (dict): Further specifications for the plot. The keywords
89
+ understood depend on the type of `x` (see below).
90
+
91
+ Returns:
92
+ None: A plot appropriate to the type of `x` is drawn. Maps of cubes
93
+ yield color or B/W raster images (optionally overlaid with segment
94
+ boundaries for vector cubes); probability, uncertainty, and
95
+ variance cubes yield per-class or per-pixel maps; classified cubes
96
+ yield color maps where each pixel is colored by its label.
97
+ Chart-based plots (patterns, predictions, embeddings, clusters,
98
+ t-SNE, model diagnostics) render the corresponding plot. Some
99
+ methods (accuracy tables, SOM diagnostics, model summaries) are
100
+ called only for their side effect of drawing the plot.
101
+
102
+ Notes:
103
+ The set of valid keyword arguments depends on the type of `x`;
104
+ passing arguments that do not apply to a given object type has no
105
+ effect. When a region of interest (`roi`) is supported, it defines
106
+ the spatial extent to plot in WGS 84.
107
+
108
+ Examples:
109
+ from pysits import *
110
+
111
+ # Plot a set of time-series patterns (one average pattern per label)
112
+ patterns = sits_patterns(samples_modis_ndvi)
113
+ plot(patterns)
114
+
115
+ # Train a random forest model and plot its important variables
116
+ rf_model = sits_train(samples_modis_ndvi, ml_method=sits_rfor())
117
+ plot(rf_model)
@@ -1,24 +1,25 @@
1
1
  Assess classification accuracy
2
2
 
3
- This function calculates the accuracy of the classification result. The input
4
- is either a set of classified time series or a classified data cube. Classified
5
- time series are produced by `sits_classify`. Classified images are generated
6
- using `sits_classify` followed by `sits_label_classification`.
3
+ This function calculates the accuracy of the classification result. The
4
+ input is either a set of classified time series or a classified data cube.
5
+ Classified time series are produced by `sits_classify`. Classified images
6
+ are generated using `sits_classify` followed by
7
+ `sits_label_classification`.
7
8
  For a set of time series, `sits_accuracy` creates a confusion matrix and
8
- calculates the resulting statistics using package `caret`. For a classified
9
- image, the function uses an area-weighted technique proposed by Olofsson et al.
10
- according to references [1-3] to produce reliable accuracy estimates at 95%
11
- confidence level. In both cases, it provides an accuracy assessment of the
9
+ calculates the resulting statistics. For a classified image, the function
10
+ uses an area-weighted technique proposed by Olofsson et al. according to
11
+ references [1-3] to produce reliable accuracy estimates at 95% confidence
12
+ level. In both cases, it provides an accuracy assessment of the
12
13
  classified, including Overall Accuracy, Kappa, User's Accuracy, Producer's
13
14
  Accuracy and error matrix (confusion matrix).
14
15
 
15
16
  Args:
16
17
  data (SITSCubeModel | SITSTimeSeriesModel): Either a data cube with
17
18
  classified images or a set of time series.
18
- prediction_attr (str): Name of the column of the segments object that
19
- contains the predicted values (only for vector class cubes).
20
- reference_attr (str): Name of the column of the segments object that
21
- contains the reference values (only for vector class cubes).
19
+ prediction_attr (str): Name of the column of the segments that contains
20
+ the predicted values (only for vector class cubes).
21
+ reference_attr (str): Name of the column of the segments that contains
22
+ the reference values (only for vector class cubes).
22
23
  validation (str | pathlib.Path | pandas.DataFrame | geopandas.GeoDataFrame | SITSTimeSeriesModel):
23
24
  Samples for validation (see below). Only required when data is a
24
25
  raster class cube.
@@ -28,15 +29,15 @@ Args:
28
29
 
29
30
  Returns:
30
31
  SITSData: The error_matrix, the class_areas, the unbiased estimated
31
- areas, the standard error areas, confidence interval 95 and the accuracy
32
- (user, producer, and overall), or `None` if the data is empty. The result
33
- can be visualized directly on the screen.
32
+ areas, the standard error areas, confidence interval 95 and the
33
+ accuracy (user, producer, and overall), or `None` if the data is
34
+ empty. The result can be visualized directly on the screen.
34
35
 
35
36
  Notes:
36
- The `validation` data needs to contain the following columns: "latitude",
37
- "longitude", "start_date", "end_date", and "label". It can be either a path
38
- to a CSV file, a `SITSTimeSeriesModel`, a `pandas.DataFrame`, or a
39
- `geopandas.GeoDataFrame`.
37
+ The `validation` data needs to contain the following columns:
38
+ "latitude", "longitude", "start_date", "end_date", and "label". It can
39
+ be either a path to a CSV file, a `SITSTimeSeriesModel`, a
40
+ `pandas.DataFrame`, or a `geopandas.GeoDataFrame`.
40
41
  When `validation` is a `geopandas.GeoDataFrame`, the columns "latitude"
41
42
  and "longitude" are not required as the locations are extracted from the
42
43
  geometry column. The `centroid` is calculated before extracting the
@@ -44,6 +45,7 @@ Notes:
44
45
 
45
46
  Examples:
46
47
  from pysits import *
48
+ import tempfile
47
49
 
48
50
  # show accuracy for a set of samples
49
51
  train_data = sits_sample(samples_modis_ndvi, frac=0.5)
@@ -65,7 +67,6 @@ Examples:
65
67
  data_dir=data_dir
66
68
  )
67
69
  # classify a data cube
68
- import tempfile
69
70
  probs_cube = sits_classify(
70
71
  data=cube, ml_model=rfor_model, output_dir=tempfile.gettempdir()
71
72
  )
@@ -0,0 +1,11 @@
1
+ Print accuracy summary
2
+
3
+ Adaptation of the caret::print.confusionMatrix method for the more
4
+ common usage in Earth Observation.
5
+
6
+ Args:
7
+ x (SITSConfusionMatrix): Accuracy assessment object.
8
+ digits (int): Number of significant digits when printed.
9
+
10
+ Returns:
11
+ SITSData: Called for side effects.
@@ -8,7 +8,7 @@ sensor, resolution, bounding box, timeline, and have different bands.
8
8
 
9
9
  Args:
10
10
  cube1 (SITSCubeModel): Data cube.
11
- cube2 (SITSCubeModel): Data cube with base information.
11
+ cube2 (SITSCubeModel): Base data cube (e.g., DEM).
12
12
 
13
13
  Returns:
14
14
  SITSCubeModel: a merged data cube with the inclusion of base
@@ -1,25 +1,25 @@
1
1
  Apply a function on a set of time series
2
2
 
3
3
  Apply a named expression to a set of time series or a data cube to be
4
- evaluated and generate new bands (indices). In the case of data cubes,
5
- it creates a new band in `output_dir`.
4
+ evaluated and generate new bands (indices). In the case of data cubes, it
5
+ creates a new band in `output_dir`.
6
6
 
7
7
  Args:
8
- data (SITSTimeSeriesModel | SITSCubeModel): valid time series or data
8
+ data (SITSTimeSeriesModel | SITSCubeModel): Valid time series or data
9
9
  cube.
10
- window_size (int): an odd number representing the size of the sliding
10
+ window_size (int): An odd number representing the size of the sliding
11
11
  window of kernel functions used in expressions (for a list of
12
12
  supported kernel functions, please see details).
13
- memsize (int): memory available for classification (in GB).
14
- multicores (int): number of cores to be used for classification.
15
- normalized (bool): does the expression produce a normalized band?
16
- output_dir (str | pathlib.Path): directory where files will be saved.
17
- progress (bool): show progress bar?
18
- **kwargs (dict): named expressions to be evaluated (see details).
13
+ memsize (int): Memory available for classification (in GB).
14
+ multicores (int): Number of cores to be used for classification.
15
+ normalized (bool): Does the expression produces a normalized band?
16
+ output_dir (str | pathlib.Path): Directory where files will be saved.
17
+ progress (bool): Show progress bar?
18
+ **kwargs (dict): Named expressions to be evaluated (see details).
19
19
 
20
20
  Returns:
21
- SITSFrame: time series or data cube with new bands, produced according
22
- to the requested expression.
21
+ SITSFrame: A set of time series or a data cube with new bands, produced
22
+ according to the requested expression.
23
23
 
24
24
  Notes:
25
25
  The main `sits` classification workflow has the following steps:
@@ -39,20 +39,19 @@ Notes:
39
39
  to remove outliers and increase spatial consistency.
40
40
  9. `sits_label_classification`: produce a classified map by selecting the
41
41
  label with the highest probability from a smoothed cube.
42
- `sits_apply()` allows any valid R expression to compute new bands. Use R
43
- syntax to pass an expression to this function. Besides arithmetic
44
- operators, you can use virtually any R function that can be applied to
45
- elements of a matrix (functions that are unaware of matrix sizes, e.g.
46
- `sqrt()`, `sin()`, `log()`).
42
+ `sits_apply()` allows any valid expression to compute new bands. Besides
43
+ arithmetic operators, you can use virtually any function that can be
44
+ applied to elements of a matrix (functions that are unaware of matrix
45
+ sizes, e.g. `sqrt()`, `sin()`, `log()`).
47
46
  Examples of valid expressions:
48
47
  1. `NDVI = (B08 - B04) / (B08 + B04)` for Sentinel-2 images.
49
- 2. `EVI = 2.5 * (B05 \04) / (B05 + 6 * B04 \7.5 * B02 + 1)` for
48
+ 2. `EVI = 2.5 * (B05 ook04) / (B05 + 6 * B04 7.5 * B02 + 1)` for
50
49
  Landsat-8/9 images.
51
50
  3. `VV_VH_RATIO = VH/VV` for Sentinel-1 images. In this case, set the
52
- `normalized` parameter to `False`.
51
+ `normalized` parameter to False.
53
52
  4. `VV_DB = 10 * log10(VV)` to convert Sentinel-1 RTC images available in
54
53
  Planetary Computer to decibels. Also, set the `normalized` parameter to
55
- `False`.
54
+ False.
56
55
  `sits_apply()` also accepts a predefined set of kernel functions (see
57
56
  below) that can be applied to pixels considering its neighborhood. The
58
57
  function considers a neighborhood of a pixel as a set of pixels equidistant
@@ -66,14 +65,13 @@ Notes:
66
65
  to a corresponding central pixel on a new matrix. The kernel slides
67
66
  throughout the input image and this process generates an entire new matrix,
68
67
  which is returned as a new band to the cube. The kernel functions ignores
69
- any `NA` values inside the kernel window. If all pixels in the window are
70
- `NA` the result will be `NA`.
68
+ any `None` values inside the kernel window. If all pixels in the window are
69
+ `None` the result will be `None`.
71
70
  By default, the indexes generated by `sits_apply()` function are normalized
72
71
  between -1 and 1, scaled by a factor of 0.0001. Normalized indexes are
73
- saved as INT2S (Integer with sign). If the `normalized` parameter is
74
- `False`, no scaling factor will be applied and the index will be saved as
75
- FLT4S (signed float) and the values will vary between -3.4e+38 and
76
- 3.4e+38.
72
+ saved as INT2S (Integer with sign). If the `normalized` parameter is False,
73
+ no scaling factor will be applied and the index will be saved as FLT4S
74
+ (signed float) and the values will vary between -3.4e+38 and 3.4e+38.
77
75
 
78
76
  Examples:
79
77
  from pysits import *
@@ -0,0 +1,28 @@
1
+ Return a set of time series or a data cube as a `geopandas.GeoDataFrame`.
2
+
3
+ Converts a set of time series or a data cube to a `geopandas.GeoDataFrame`.
4
+
5
+ Args:
6
+ data (SITSTimeSeriesModel | SITSCubeModel): a set of time series or
7
+ a data cube.
8
+ crs (CRS): input coordinate reference system.
9
+ as_crs (CRS): output coordinate reference system.
10
+ **kwargs (dict): additional parameters.
11
+
12
+ Returns:
13
+ SITSFrame: a point or polygon geometry object.
14
+
15
+ Examples:
16
+ from pysits import *
17
+
18
+ # convert sits tibble to a GeoPandas object (point)
19
+ geo_object = sits_as_geopandas(cerrado_2classes)
20
+
21
+ # convert sits cube to a GeoPandas object (polygon)
22
+ data_dir = r_package_dir("extdata/raster/mod13q1", package="sits")
23
+ cube = sits_cube(
24
+ source="BDC",
25
+ collection="MOD13Q1-6.1",
26
+ data_dir=data_dir
27
+ )
28
+ geo_object = sits_as_geopandas(cube)
@@ -7,34 +7,32 @@ views' embeddings close to the identity: the diagonal -> 1 (invariance) and the
7
7
  off-diagonal -> 0 (redundancy reduction). No negatives are required.
8
8
  The function can be used in two ways:
9
9
  - If `samples` is provided, it trains immediately and returns an encoder-ready
10
- model object (see Value).
11
- - If `samples = None`, it returns a training function with signature
10
+ model object (see Returns).
11
+ - If `samples` is `None`, it returns a training function with signature
12
12
  `function(samples)` that can be passed to `sits_pre_train` or called later.
13
13
 
14
14
  Args:
15
- samples (SITSTimeSeriesModel): A set of sample time series. If `None`
16
- (default), returns a training function. If provided, triggers
17
- immediate training. Base data samples (e.g., `sits_base`) are not
18
- supported.
15
+ samples (SITSTimeSeriesModel): Sample time series. If `None` (default),
16
+ returns a training function. If provided, triggers immediate
17
+ training. Base data samples (e.g., `sits_base`) are not supported.
19
18
  embedding_dim (int): Dimensionality of the encoder embedding (exported
20
19
  features). Default: 64.
21
20
  proj_dim (int): Dimensionality of the projector head used only during
22
21
  pre-training. Default: 256.
23
- bt_lambda (float): Weight of the redundancy-reduction (off-diagonal)
24
- term in the Barlow Twins loss. Default: 5e-3.
22
+ bt_lambda (float): Weight of the redundancy-reduction (off-diagonal) term
23
+ in the Barlow Twins loss. Default: 5e-3.
25
24
  num_pairs (int | None): Total number of pairs to form per epoch. When
26
- `None` (default), one pair is formed for every sample in the
27
- training split.
28
- encoder_model (SITSMachineLearningMethod): Deep learning method that
29
- takes time series as input and produces latent representations that
30
- are used to compute the loss function (suggested options:
31
- `sits_tempcnn()`, `sits_lighttae()`, `sits_resnet()`). Default:
32
- `sits_tempcnn()`.
25
+ `None` (default), one pair is formed for every sample in the training
26
+ split.
27
+ encoder_model (SITSMachineLearningMethod): Deep learning method that takes
28
+ time series as input and produces latent representations that are used
29
+ to compute the loss function (suggested options: `sits_tempcnn()`,
30
+ `sits_lighttae()`, `sits_resnet()`). Default: `sits_tempcnn()`.
33
31
  epochs (int): Maximum number of training epochs.
34
32
  batch_size (int): Batch size for training. Larger values improve the
35
33
  Barlow Twins cross-correlation estimate. Default: 128.
36
- validation_split (float): Fraction of samples held out for validation
37
- loss monitoring, in the range (0, 1).
34
+ validation_split (float): Fraction of samples held out for validation loss
35
+ monitoring, in (0, 1).
38
36
  optimizer: A `torch` optimizer constructor (default:
39
37
  `torch::optim_adamw`).
40
38
  opt_hparams (dict): Optimizer hyperparameters. Common entries: `lr`,
@@ -44,11 +42,11 @@ Args:
44
42
  patience (int): Early-stopping patience (epochs without improvement).
45
43
  min_delta (float): Minimum improvement required to reset the patience
46
44
  counter.
47
- verbose (bool): Print training progress?
45
+ verbose (bool): Whether to print training progress.
48
46
  seed (int): Random seed for reproducibility.
49
47
 
50
48
  Returns:
51
- R: If `samples = None`, a training function with signature
49
+ R: If `samples` is `None`, a training function with signature
52
50
  `function(samples)` that trains a Barlow Twins model and returns a
53
51
  pretrained encoder. If `samples` is provided, the result of applying the
54
52
  training function to `samples` directly.
@@ -5,18 +5,18 @@ projection coordinates in the case of cubes)
5
5
 
6
6
  Args:
7
7
  data (SITSTimeSeriesModel | SITSCubeModel): samples or data cube.
8
- crs (str): CRS of the time series.
9
- as_crs (str): CRS to project the resulting bounding box.
8
+ crs (CRS): CRS of the time series.
9
+ as_crs (CRS): CRS to project the resulting bounding box.
10
10
  **kwargs (dict): parameters for specific types.
11
11
 
12
12
  Returns:
13
13
  SITSFrame: the bounding box.
14
14
 
15
15
  Notes:
16
- Time series in `sits` are associated with lat/long values in WGS84,
17
- while each data cube is associated to a cartographic projection. To
18
- obtain the bounding box of a data cube in a different projection than
19
- the original, use the `as_crs` parameter.
16
+ Time series are associated with lat/long values in WGS84, while
17
+ each data cube is associated to a cartographic projection. To
18
+ obtain the bounding box of a data cube in a different projection
19
+ than the original, use the `as_crs` parameter.
20
20
 
21
21
  Examples:
22
22
  from pysits import *