Instantiate a FCMres object from a list

FCMres(obj)

Arguments

obj

A list, typically obtained from functions CMeans, GCMeans, SFCMeans, SGFCMeans

Value

An object of class FCMres

Details

Creating manually a FCMres object can be handy to use geocmeans functions on results from external algorithms. The list given to function FCMres must contain 5 necessary parameters:

  • Centers: a dataframe or matrix describing the final centers of the groups

  • Belongings: a membership matrix

  • Data: the dataset used to perform the clustering. It must be a dataframe or a matrix. If a list is given, then the function assumes that the classification occured on rasters (see information below)

  • m: the fuzyness degree (1 if hard clustering is used)

  • algo: the name of the algorithm used

Note that the S3 method predict is available only for object created with the functions CMeans, GCMeans, SFCMeans, SGFCMeans.

When working with rasters, Data must be a list of rasters, and a second list of rasters with the membership values must be provided is en extra slot named "rasters". In that case, Belongings has not to be defined and will be created automatically.

Warning: the order of the elements is very important. The first row in the matrix "Centers", and the first column in the matrix "Belongings" must both be related to the same group and so on. When working with raster data, the first row in the matrix "Centers" must also match with the first rasterLayer in the list "rasters".

Examples

#This is an internal function, no example provided