Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix cluster ids #239

Merged
merged 4 commits into from
Aug 16, 2024
Merged

fix cluster ids #239

merged 4 commits into from
Aug 16, 2024

Conversation

f-lukas
Copy link
Contributor

@f-lukas f-lukas commented Aug 15, 2024

#238

@arunge if you are fine with the changes, I would also post this explanation after merging:

The reason for the non-continuous cluster ids here was not the extra step we take to find the temporal groups. Instead, it was because of how mclust works. If we run mclust with 10 clusters, it is possible that only 8 clusters appear in the output and the others remain empty. Nevertheless, this solution can perform better in terms of the BIC than calculating mclust directly with 8 clusters. If this is the case, cluster ids may remain empty.

This could be fixed with just a few lines of code. Now that I know the reason, I also think that it is better not to keep the old cluster ids in extra columns. This is what I have implemented.

Copy link
Contributor

@arunge arunge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check and merge following PR first: #240

@arunge arunge assigned f-lukas and unassigned arunge Aug 15, 2024
@f-lukas f-lukas requested a review from arunge August 16, 2024 06:42
@f-lukas f-lukas assigned arunge and unassigned f-lukas Aug 16, 2024
@arunge arunge assigned f-lukas and unassigned arunge Aug 16, 2024
@f-lukas f-lukas merged commit 0aa1bb8 into beta Aug 16, 2024
1 check passed
@f-lukas f-lukas deleted the fix/cluster_ids branch August 16, 2024 07:09
arunge added a commit that referenced this pull request Aug 16, 2024
* altitude operations (#191)

* altitude operations

* Fix

* set default differently

* make data points selectable in locateR

* update news

* Fix for older version

* fixes

* fix progress message

* remove comments

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* Fix error with mask (#208)

* add new tests

* extract function centerPlotData

* add tryCatch to plotting of map, add data preview, add logDebugs

* remove deprecated parameter 'mainfolder', add data preview

* update news.md

* catch failing of maskDraw if no data

* update news.md

* fix issue when drawing only centroids, add test

* add tryCatch to left plotting functions

* Version 24.05.0: Feat/202 contour maps (#210)

* option to use simple contour map, some formatting

* update news.md

* Feat/169 centering of coordinates (#215)

* new functions and ui input

* align values

* center predictions

* UI to center data coordinates before modelling

* add logic to center data before modelling to different modelling tabs

* add logic

* remove comments

* update news.md

* update news.md

* rename input to prevent confusion with parameter from batch mode

* extract processing of coordinate data

* extract and apply data augmentation

* fix issue with wrong default zoom when switching the map center

* add more docu

* more docu

* update test because of new logic

* add a vignette to the package about the processing of coordinate data

* update news.md

* fix for data augmentation

* Version 24.05.2: option to select a specific color for "fixed" point colour (#216)

* option to select a specific color for "fixed" point colour

* new button to apply point settings and the logic

* update news.md

* update tests after adding new input

* fix news.md

* MpiIsoApp 24.05.3: Bugfix missing lat/long (#219)

* BUG!!

* Bugfix

* update news.md

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* MpiIsoApp 24.05.4: fix warning (#217)

* fix warning

* extract updatePenalty function

* update news.md

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* MpiIsoApp 24.05.5: optionally download savedMaps (#222)

* optionally download savedMaps

* format new UI

* MpiIsoApp 24.05.6: option to export all plots from savedMaps (#223)

* option to export all plots from savedMaps

* remove not required

* picker input to select savedMaps for download

* shift code

* update news.md

* fix issue with missing thumbnail plot

* return empty list if missing

* cleaner return

* remove option to download savedMaps objects

* add docu

* add param to docu

* MpiIsoApp 24.05.7: Feat/224 warning if creating prob map (#225)

* fix issue with missing thumbnails, fix pch value

* update news.md

* set pch to NA

* remove warning

* replace deprecated package name

* Feature/203 json for mapr (#234)

* zipm export option

* namespace

* Feature/203 json for mapr review (#235)

* inline function for file extension

* fix typo

* add comment

* fix logic, remove package magrittr

* add helpttext ignoring Filetype input

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* fix cluster ids (#239)

* fix cluster ids

* extract logic into function

* fix name of df

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

---------

Co-authored-by: Marcus Groß <marcus.gross@inwt-statistics.de>
Co-authored-by: Lukas Fuchs <86153843+f-lukas@users.noreply.github.com>
arunge added a commit that referenced this pull request Oct 10, 2024
* altitude operations (#191)

* altitude operations

* Fix

* set default differently

* make data points selectable in locateR

* update news

* Fix for older version

* fixes

* fix progress message

* remove comments

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* Fix error with mask (#208)

* add new tests

* extract function centerPlotData

* add tryCatch to plotting of map, add data preview, add logDebugs

* remove deprecated parameter 'mainfolder', add data preview

* update news.md

* catch failing of maskDraw if no data

* update news.md

* fix issue when drawing only centroids, add test

* add tryCatch to left plotting functions

* Version 24.05.0: Feat/202 contour maps (#210)

* option to use simple contour map, some formatting

* update news.md

* Feat/169 centering of coordinates (#215)

* new functions and ui input

* align values

* center predictions

* UI to center data coordinates before modelling

* add logic to center data before modelling to different modelling tabs

* add logic

* remove comments

* update news.md

* update news.md

* rename input to prevent confusion with parameter from batch mode

* extract processing of coordinate data

* extract and apply data augmentation

* fix issue with wrong default zoom when switching the map center

* add more docu

* more docu

* update test because of new logic

* add a vignette to the package about the processing of coordinate data

* update news.md

* fix for data augmentation

* Version 24.05.2: option to select a specific color for "fixed" point colour (#216)

* option to select a specific color for "fixed" point colour

* new button to apply point settings and the logic

* update news.md

* update tests after adding new input

* fix news.md

* MpiIsoApp 24.05.3: Bugfix missing lat/long (#219)

* BUG!!

* Bugfix

* update news.md

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* MpiIsoApp 24.05.4: fix warning (#217)

* fix warning

* extract updatePenalty function

* update news.md

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* MpiIsoApp 24.05.5: optionally download savedMaps (#222)

* optionally download savedMaps

* format new UI

* MpiIsoApp 24.05.6: option to export all plots from savedMaps (#223)

* option to export all plots from savedMaps

* remove not required

* picker input to select savedMaps for download

* shift code

* update news.md

* fix issue with missing thumbnail plot

* return empty list if missing

* cleaner return

* remove option to download savedMaps objects

* add docu

* add param to docu

* MpiIsoApp 24.05.7: Feat/224 warning if creating prob map (#225)

* fix issue with missing thumbnails, fix pch value

* update news.md

* set pch to NA

* remove warning

* replace deprecated package name

* Feature/203 json for mapr (#234)

* zipm export option

* namespace

* Feature/203 json for mapr review (#235)

* inline function for file extension

* fix typo

* add comment

* fix logic, remove package magrittr

* add helpttext ignoring Filetype input

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* fix cluster ids (#239)

* fix cluster ids

* extract logic into function

* fix name of df

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* Spread curve (#232)

* BUG!!

* Bugfix

* initial MR

* implement in UI

* fix issue kernel density

* get updates from beta (#242)

* MpiIsoApp 24.05.3: Bugfix missing lat/long (#219)

* BUG!!

* Bugfix

* update news.md

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* MpiIsoApp 24.05.4: fix warning (#217)

* fix warning

* extract updatePenalty function

* update news.md

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* MpiIsoApp 24.05.5: optionally download savedMaps (#222)

* optionally download savedMaps

* format new UI

* MpiIsoApp 24.05.6: option to export all plots from savedMaps (#223)

* option to export all plots from savedMaps

* remove not required

* picker input to select savedMaps for download

* shift code

* update news.md

* fix issue with missing thumbnail plot

* return empty list if missing

* cleaner return

* remove option to download savedMaps objects

* add docu

* add param to docu

* MpiIsoApp 24.05.7: Feat/224 warning if creating prob map (#225)

* fix issue with missing thumbnails, fix pch value

* update news.md

* set pch to NA

* doc rcmd and rm rgpt3 and rename r pkg (#227)

* add inwtlab repo to .Rprofile file

* add pkgdown doc

* add pandora base image to pkg down workflow

* remove rgpt3 dependency

* add r-cmd check via actions

* renaming of r-package

* update README

* update NEWS

* MpiIsoApp 24.04.2: replace retired packages (#230)

* add test dataQuery

* replace retired packages

---------

Co-authored-by: Jan Abel <106665518+jan-abel-inwt@users.noreply.github.com>

* add rcmd check badge

---------

Co-authored-by: Jan Abel <jan.abel@office-platform.net>
Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* remove warning

* replace deprecated package name

* add deploy job without base-image

* Release versions 24.06.0.2 from beta (#231)

* altitude operations (#191)

* altitude operations

* Fix

* set default differently

* make data points selectable in locateR

* update news

* Fix for older version

* fixes

* fix progress message

* remove comments

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* Fix error with mask (#208)

* add new tests

* extract function centerPlotData

* add tryCatch to plotting of map, add data preview, add logDebugs

* remove deprecated parameter 'mainfolder', add data preview

* update news.md

* catch failing of maskDraw if no data

* update news.md

* fix issue when drawing only centroids, add test

* add tryCatch to left plotting functions

* Version 24.05.0: Feat/202 contour maps (#210)

* option to use simple contour map, some formatting

* update news.md

* Feat/169 centering of coordinates (#215)

* new functions and ui input

* align values

* center predictions

* UI to center data coordinates before modelling

* add logic to center data before modelling to different modelling tabs

* add logic

* remove comments

* update news.md

* update news.md

* rename input to prevent confusion with parameter from batch mode

* extract processing of coordinate data

* extract and apply data augmentation

* fix issue with wrong default zoom when switching the map center

* add more docu

* more docu

* update test because of new logic

* add a vignette to the package about the processing of coordinate data

* update news.md

* fix for data augmentation

* Version 24.05.2: option to select a specific color for "fixed" point colour (#216)

* option to select a specific color for "fixed" point colour

* new button to apply point settings and the logic

* update news.md

* update tests after adding new input

* fix news.md

* MpiIsoApp 24.05.3: Bugfix missing lat/long (#219)

* BUG!!

* Bugfix

* update news.md

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* MpiIsoApp 24.05.4: fix warning (#217)

* fix warning

* extract updatePenalty function

* update news.md

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* MpiIsoApp 24.05.5: optionally download savedMaps (#222)

* optionally download savedMaps

* format new UI

* MpiIsoApp 24.05.6: option to export all plots from savedMaps (#223)

* option to export all plots from savedMaps

* remove not required

* picker input to select savedMaps for download

* shift code

* update news.md

* fix issue with missing thumbnail plot

* return empty list if missing

* cleaner return

* remove option to download savedMaps objects

* add docu

* add param to docu

* MpiIsoApp 24.05.7: Feat/224 warning if creating prob map (#225)

* fix issue with missing thumbnails, fix pch value

* update news.md

* set pch to NA

* remove warning

* replace deprecated package name

---------

Co-authored-by: Marcus Groß <marcus.gross@inwt-statistics.de>

* merge changes from beta

---------

Co-authored-by: Marcus Groß <marcus.gross@inwt-statistics.de>
Co-authored-by: Jan Abel <106665518+jan-abel-inwt@users.noreply.github.com>
Co-authored-by: Jan Abel <jan.abel@office-platform.net>

* use older version of gdistance

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>
Co-authored-by: Jan Abel <106665518+jan-abel-inwt@users.noreply.github.com>
Co-authored-by: Jan Abel <jan.abel@office-platform.net>

* DSSM 24.08.1: Feat/236 button info basis functions (#237)

* commit new module for smoothing containing the info button

* shift logic for 3D map into smoothingServer

* update News.md

* rename file

* apply simplified module for model upload

* format new code

* fix missing parameter K

* new feature request (#243)

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* DSSM 24.08.5: Feature/204 tclust (#244)

* tclust wip

* adjust tclust inputs

* add tclust as clustering method

* fix check

* Feature/204 tclust review (#246)

* refactor duplicated code

* do clustering (on original data and after modelling) exactly as for kernelTimeR

* fix export of data

* remove duplicated code

* update news.md

* update namespace

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* fix null input (#249)

* New option to adjust smoothness of kernel density estimator in KernelR and KernelTimeR (#245)

* Add smoothness option to kde

* update docu

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* hide center Radius if no center coordinates are set (#254)

* add input and link to docu (#257)

* add input and link to docu

* upddate docu

* cleaner UI for clustering

---------

Co-authored-by: Antonia Runge <antonia.runge@inwt-statistics.de>

* use same penalty for sV as for s (#253)

---------

Co-authored-by: Marcus Groß <marcus.gross@inwt-statistics.de>
Co-authored-by: Lukas Fuchs <86153843+f-lukas@users.noreply.github.com>
Co-authored-by: Jan Abel <106665518+jan-abel-inwt@users.noreply.github.com>
Co-authored-by: Jan Abel <jan.abel@office-platform.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants