Skip to content

Commit

Permalink
Merge pull request #1273 from OldLipe/feat/dev-sits
Browse files Browse the repository at this point in the history
Improve segments processing in `sits_classify`
  • Loading branch information
OldLipe authored Jan 23, 2025
2 parents d217077 + 646d830 commit 8c08fe5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
19 changes: 15 additions & 4 deletions R/api_classify.R
Original file line number Diff line number Diff line change
Expand Up @@ -654,9 +654,15 @@
values <- ml_model(values)
# normalize and calibrate values
values <- .ml_normalize(ml_model, values)
# Extract columns
values_columns <- colnames(values)
# Transform classification results
values <- tibble::tibble(as.data.frame(values))
# Fix column names to avoid errors with non-standard column name
# (e.g., with spaces, icons)
colnames(values) <- values_columns
# Return classification
values <- tibble::as_tibble(values)
values
return(values)
}, progress = progress)

return(prediction)
Expand Down Expand Up @@ -696,8 +702,13 @@
values <- ml_model(values)
# normalize and calibrate values
values <- .ml_normalize(ml_model, values)
# Return classification
values <- tibble::as_tibble(values)
# Extract columns
values_columns <- colnames(values)
# Transform classification results
values <- tibble::tibble(as.data.frame(values))
# Fix column names to avoid errors with non-standard column name
# (e.g., with spaces, icons)
colnames(values) <- values_columns
# Clean GPU memory
.ml_gpu_clean(ml_model)
return(values)
Expand Down
2 changes: 1 addition & 1 deletion man/sits_view.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion sits.Rproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Version: 1.0
ProjectId: 85f873d3-da0f-4f35-8a60-0a0316605680

RestoreWorkspace: Default
SaveWorkspace: Ask
Expand Down

0 comments on commit 8c08fe5

Please sign in to comment.