jeremygelb / geocmeans Goto Github PK
View Code? Open in Web Editor NEWAn R package to perform Spatial Fuzzy C-means
License: GNU General Public License v2.0
An R package to perform Spatial Fuzzy C-means
License: GNU General Public License v2.0
With the change from raster to terra, the expected input format for raster data is now a list of spaRaster
objects and not raster
objects. If one gives rasters object, the error produced is not helpful.
geocmeans should test the type of object given and return an error if they are not from the expected class.
I've noticed that the examples provided do not include seed values when utilizing random processes, such as clustering. I was wondering if you expect reproducibility or not. For example, in the following examples:
https://jeremygelb.github.io/geocmeans/articles/introduction.html
While it's understood that in clustering, some variability can be acceptable, setting a seed ensures reproducibility and consistency in the results, especially for examples and tutorials.
Thank you for your hard work on this package, and I look forward to any updates.
This issue is related to openjournals/joss-reviews#5259 .
Hi. Please note that multiprocess is deprecated since future 1.20.0 (2020-11-03) and will soon be defunct:
Please take a look at the following example. The first block runs successfully, however, the second block raises the following error:
https://jeremygelb.github.io/geocmeans/articles/web_vignettes/advanced_examples.html
> # classical fuzzy cmeans
> result1 <- CMeans(df, 2, 1.5, standardize = TRUE, robust = FALSE, verbose = FALSE, seed = 176)
Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric
This package depends on (depends, imports or suggests) raster and one or more of the retiring packages rgdal, rgeos or maptools (https://r-spatial.org/r/2022/04/12/evolution.html, https://r-spatial.org/r/2022/12/14/evolution2.html). Since raster 3.6.3
, all use of external FOSS library functionality has been transferred to terra, making the retiring packages very likely redundant. It would help greatly if you could remove dependencies on the retiring packages as soon as possible.
I am excited about this package! Thank you for developing it.
If I supply a list with only one raster to any of the clustering functions I get an error
"Error in `colnames<-`(`*tmp*`, value = okname) :
attempt to set 'colnames' on an object with less than two dimensions"
But, supplying a list with two rasters works.
Expected behaviour: One should also be able to make a clustering using just a single variable, correct? e.g. a map of NDVI
> R.Version()
$platform
[1] "x86_64-w64-mingw32"
$arch
[1] "x86_64"
$os
[1] "mingw32"
$system
[1] "x86_64, mingw32"
$version.string
[1] "R version 4.1.2 (2021-11-01)"
library(geocmeans) # 0.2.0
library(raster) # v 3.5-15
# example rasters r and s
r <- raster(nrows=10, ncols=10)
values(r) <- runif(ncell(r))
s <- raster(nrow = 10, ncol = 10)
values(s) <- rnorm(ncell(s))
CMeans(data = list(r), # one raster
k = 3,
m = 1.5,
maxiter = 100,
seed = 235)
# Error in `colnames<-`(`*tmp*`, value = okname) :
# attempt to set 'colnames' on an object with less than two dimensions
CMeans(data = list(r,s), #using two rasters works
k = 3,
m = 1.5,
maxiter = 100,
seed = 235)
# [1] "Standardizing the data (set parameter to FALSE to avoid this step)"
# |===================== | 29%[1] "criterion reached"
# Same behaviour for other functions. e.g.
GCMeans(data = list(s), # doesn't work
k = 3,
m = 1.5,
beta = 1,
maxiter = 100,
seed = 235)
#[1] "Standardizing the data (set parameter to FALSE to avoid this step)"
#Error in `colnames<-`(`*tmp*`, value = okname) :
# attempt to set 'colnames' on an object with less than two dimensions
window.matrix <- matrix(1/9,nrow = 3, ncol = 3)
SFCMeans(data = list(r),
window = window.matrix,
k = 3,
m = 1.5,
alpha = 1)
# Error in `colnames<-`(`*tmp*`, value = okname) :
# attempt to set 'colnames' on an object with less than two dimensions
Hi,
First of all, thank you for developing this much needed package.
I ran into an error using mapCluster function.
Code
cmeansMaps<- mapClusters(reseauALL_C_sp,Cmean$Belongings,undecided = 0.45)
Message
Error in fix.by(by.y, y) : 'by' must specify a uniquely valid column
where reseauALL_C_sp is a sp dataframe, the same that was used to create the membership matrix.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.