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

Error when using clusterGrid() in prediction mode and using self-organizing maps #36

Open
SabinTaranu opened this issue Jun 11, 2021 · 0 comments

Comments

@SabinTaranu
Copy link

The error I get:
"NOTE: Some of the specified dimensions do not exist in the grid
Error in if (n.var != 1) { : missing value where TRUE/FALSE needed"

The code I try to run
grid <- CMIP5_Iberia_psl
newdata <- CMIP5_Iberia_psl.rcp85
cluster.training <- clusterGrid(grid = grid, type = "som", centers = c(10,1))
clusters.prediction <- clusterGrid(grid = cluster.training, newdata = newdata, centers = attr(cluster.training, "centers"))

My ideas:
Since I am using the default data and example, I believe there is some dependency problem between the packages I am using.
Do you have any suggestions on how I could overcome the issue? It seems that the same code using kmean clustering would work, but I prefer to use SOM if possible.
Thank you!

Sabin

This is the output of my print(sessionInfo()):
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] loadeR_1.7.0 climate4R.UDG_0.2.0 loadeR.java_1.1.1
[4] rJava_0.9-13 transformeR_2.1.1

loaded via a namespace (and not attached):
[1] padr_0.5.3 shape_1.4.5 RcppEigen_0.3.3.7.0
[4] spam_2.5-1 zoo_1.8-8 akima_0.6-2.1
[7] pbapply_1.4-3 splines_4.0.2 lattice_0.20-41
[10] tcltk_4.0.2 colorspace_2.0-1 mapplots_1.5.1
[13] gridGraphics_0.5-0 survival_3.1-12 rlang_0.4.7
[16] sm_2.2-5.6 easyVerification_0.4.4 CircStats_0.2-6
[19] sp_1.4-2 RColorBrewer_1.1-2 foreach_1.5.0
[22] jpeg_0.1-8.1 lifecycle_0.2.0 verification_1.42
[25] fields_11.5 dotCall64_1.0-0 gtable_0.3.0
[28] munsell_0.5.0 codetools_0.2-16 latticeExtra_0.6-29
[31] parallel_4.0.2 evd_2.3-3 Rcpp_1.0.5
[34] scales_1.1.1 abind_1.4-5 kohonen_3.0.10
[37] gridExtra_2.3 png_0.1-7 dtw_1.22-3
[40] grid_4.0.2 tools_4.0.2 bitops_1.0-6
[43] magrittr_2.0.1 maps_3.3.0 glmnet_4.0-2
[46] RCurl_1.98-1.2 proxy_0.4-24 SpecsVerification_0.5-3
[49] MASS_7.3-51.6 Matrix_1.2-18 data.table_1.13.0
[52] deepnet_0.2 iterators_1.0.12 R6_2.4.1
[55] vioplot_0.3.5 boot_1.3-25 compiler_4.0.2

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

No branches or pull requests

1 participant