Skip to content

Commit c60bdca

Browse files
fix plot
2 parents be4360c + 5f53f47 commit c60bdca

23 files changed

+1802
-310
lines changed

.github/.gitignore

-1
This file was deleted.

.github/workflows/rhub.yaml

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# R-hub's generic GitHub Actions workflow file. It's canonical location is at
2+
# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml
3+
# You can update this file to a newer version using the rhub2 package:
4+
#
5+
# rhub::rhub_setup()
6+
#
7+
# It is unlikely that you need to modify this file manually.
8+
9+
name: R-hub
10+
run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}"
11+
12+
on:
13+
workflow_dispatch:
14+
inputs:
15+
config:
16+
description: 'A comma separated list of R-hub platforms to use.'
17+
type: string
18+
default: 'linux,windows,macos'
19+
name:
20+
description: 'Run name. You can leave this empty now.'
21+
type: string
22+
id:
23+
description: 'Unique ID. You can leave this empty now.'
24+
type: string
25+
26+
jobs:
27+
28+
setup:
29+
runs-on: ubuntu-latest
30+
outputs:
31+
containers: ${{ steps.rhub-setup.outputs.containers }}
32+
platforms: ${{ steps.rhub-setup.outputs.platforms }}
33+
34+
steps:
35+
# NO NEED TO CHECKOUT HERE
36+
- uses: r-hub/actions/setup@v1
37+
with:
38+
config: ${{ github.event.inputs.config }}
39+
id: rhub-setup
40+
41+
linux-containers:
42+
needs: setup
43+
if: ${{ needs.setup.outputs.containers != '[]' }}
44+
runs-on: ubuntu-latest
45+
name: ${{ matrix.config.label }}
46+
strategy:
47+
fail-fast: false
48+
matrix:
49+
config: ${{ fromJson(needs.setup.outputs.containers) }}
50+
container:
51+
image: ${{ matrix.config.container }}
52+
53+
steps:
54+
- uses: r-hub/actions/checkout@v1
55+
- uses: r-hub/actions/platform-info@v1
56+
with:
57+
token: ${{ secrets.RHUB_TOKEN }}
58+
job-config: ${{ matrix.config.job-config }}
59+
- uses: r-hub/actions/setup-deps@v1
60+
with:
61+
token: ${{ secrets.RHUB_TOKEN }}
62+
job-config: ${{ matrix.config.job-config }}
63+
- uses: r-hub/actions/run-check@v1
64+
with:
65+
token: ${{ secrets.RHUB_TOKEN }}
66+
job-config: ${{ matrix.config.job-config }}
67+
68+
other-platforms:
69+
needs: setup
70+
if: ${{ needs.setup.outputs.platforms != '[]' }}
71+
runs-on: ${{ matrix.config.os }}
72+
name: ${{ matrix.config.label }}
73+
strategy:
74+
fail-fast: false
75+
matrix:
76+
config: ${{ fromJson(needs.setup.outputs.platforms) }}
77+
78+
steps:
79+
- uses: r-hub/actions/checkout@v1
80+
- uses: r-hub/actions/setup-r@v1
81+
with:
82+
job-config: ${{ matrix.config.job-config }}
83+
token: ${{ secrets.RHUB_TOKEN }}
84+
- uses: r-hub/actions/platform-info@v1
85+
with:
86+
token: ${{ secrets.RHUB_TOKEN }}
87+
job-config: ${{ matrix.config.job-config }}
88+
- uses: r-hub/actions/setup-deps@v1
89+
with:
90+
job-config: ${{ matrix.config.job-config }}
91+
token: ${{ secrets.RHUB_TOKEN }}
92+
- uses: r-hub/actions/run-check@v1
93+
with:
94+
job-config: ${{ matrix.config.job-config }}
95+
token: ${{ secrets.RHUB_TOKEN }}

DESCRIPTION

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Description: An end-to-end toolkit for land use and land cover classification
2727
random forests, extreme gradient boosting, multi-layer perceptrons,
2828
temporal convolutional neural networks proposed by Pelletier et al (2019) <doi:10.3390/rs11050523>,
2929
residual networks by Fawaz et al (2019) <doi:10.1007/s10618-019-00619-1>, and temporal attention encoders
30-
by Garnot and Landrieu (2020) <doi:10.48550/arXiv.2007.00586de>.
30+
by Garnot and Landrieu (2020) <doi:10.48550/arXiv.2007.00586>.
3131
Performs efficient classification of big Earth observation data cubes and includes
3232
functions for post-classification smoothing based on Bayesian inference, and
3333
methods for uncertainty assessment. Enables best
@@ -138,6 +138,7 @@ Collate:
138138
'api_gdal.R'
139139
'api_gdalcubes.R'
140140
'api_jobs.R'
141+
'api_kohonen.R'
141142
'api_label_class.R'
142143
'api_merge.R'
143144
'api_mixture_model.R'

NAMESPACE

+5-1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ S3method(.data_get_ts,raster_cube)
9393
S3method(.gc_arrange_images,raster_cube)
9494
S3method(.mosaic_split_band_date,derived_cube)
9595
S3method(.mosaic_split_band_date,raster_cube)
96+
S3method(.opensearch_cdse_extract_tile,RTC)
97+
S3method(.opensearch_cdse_extract_tile,S2MSI2A)
98+
S3method(.opensearch_cdse_search,RTC)
99+
S3method(.opensearch_cdse_search,S2MSI2A)
96100
S3method(.raster_check_package,terra)
97101
S3method(.raster_col,terra)
98102
S3method(.raster_crop,terra)
@@ -355,6 +359,7 @@ S3method(sits_labels,sits_model)
355359
S3method(sits_labels_summary,sits)
356360
S3method(sits_merge,default)
357361
S3method(sits_merge,raster_cube)
362+
S3method(sits_merge,sar_cube)
358363
S3method(sits_merge,sits)
359364
S3method(sits_mixture_model,default)
360365
S3method(sits_mixture_model,derived_cube)
@@ -413,7 +418,6 @@ S3method(summary,sits_accuracy)
413418
S3method(summary,sits_area_accuracy)
414419
export("sits_bands<-")
415420
export("sits_labels<-")
416-
export(.mpc_clean_token_cache)
417421
export(impute_linear)
418422
export(sits_accuracy)
419423
export(sits_accuracy_summary)

R/RcppExports.R

+26-10
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,32 @@ C_kernel_modal <- function(x, ncols, nrows, band, window_size) {
3737
.Call(`_sits_C_kernel_modal`, x, ncols, nrows, band, window_size)
3838
}
3939

40-
dtw <- function() {
41-
.Call(`_sits_dtw`)
40+
kohonen_dtw <- function() {
41+
.Call(`_sits_kohonen_dtw`)
42+
}
43+
44+
kohonen_euclidean <- function() {
45+
.Call(`_sits_kohonen_euclidean`)
46+
}
47+
48+
kohonen_object_distances <- function(data, numVars, numNAs, distanceFunction, weights) {
49+
.Call(`_sits_kohonen_object_distances`, data, numVars, numNAs, distanceFunction, weights)
50+
}
51+
52+
RcppMap <- function(data, numVars, numNAs, codes, weights, distanceFunction) {
53+
.Call(`_sits_RcppMap`, data, numVars, numNAs, codes, weights, distanceFunction)
54+
}
55+
56+
RcppSupersom <- function(data, codes, numVars, weights, distanceFunction, numNAs, neighbourhoodDistances, alphas, radii, numEpochs) {
57+
.Call(`_sits_RcppSupersom`, data, codes, numVars, weights, distanceFunction, numNAs, neighbourhoodDistances, alphas, radii, numEpochs)
58+
}
59+
60+
RcppBatchSupersom <- function(data, codes, numVars, weights, distanceFunction, numNAs, neighbourhoodDistances, radii, numEpochs) {
61+
.Call(`_sits_RcppBatchSupersom`, data, codes, numVars, weights, distanceFunction, numNAs, neighbourhoodDistances, radii, numEpochs)
62+
}
63+
64+
RcppParallelBatchSupersom <- function(data, codes, numVars, weights, distanceFunction, numNAs, neighbourhoodDistances, radii, numEpochs, numCores) {
65+
.Call(`_sits_RcppParallelBatchSupersom`, data, codes, numVars, weights, distanceFunction, numNAs, neighbourhoodDistances, radii, numEpochs, numCores)
4266
}
4367

4468
C_label_max_prob <- function(x) {
@@ -141,14 +165,6 @@ C_temp_iqr <- function(mtx) {
141165
.Call(`_sits_C_temp_iqr`, mtx)
142166
}
143167

144-
rlang_env_unlock <- function(env) {
145-
invisible(.Call(`_sits_rlang_env_unlock`, env))
146-
}
147-
148-
rlang_env_lock <- function(env) {
149-
invisible(.Call(`_sits_rlang_env_lock`, env))
150-
}
151-
152168
C_max_sampling <- function(x, nrows, ncols, window_size) {
153169
.Call(`_sits_C_max_sampling`, x, nrows, ncols, window_size)
154170
}

0 commit comments

Comments
 (0)