agnes: Agglomerative Nesting

Description Usage Arguments Details Value Constraints See Also Examples

Description

agnes computes agglomeraive hierarchial clustering on FLTable objects.

Usage

1
agnes(x, ...)

Arguments

x

an object of class FLTable, can be wide or deep table

diss

logical if x is dissimilarity matrix. currently not used

metric

only "euclidean" distance supported currently

Stand

logical indicating if standardization should be done before calculating diss matrix

method

character. Allowed methods are "average", "single", "complete", "centroid"

par.method

currently not used and always 0

keep.diss

logicals indicating if the dissimilarities and/or input data x should be kept in the result

keep.data

logicals indicating if the dissimilarities and/or input data x should be kept in the result

trace.lev

integer specifying a trace level for printing diagnostics during the build and swap phase of the algorithm. currently always 0

maxit

maximum number of iterations

excludeCols

the comma separated character string of columns to be excluded

classSpec

list describing the categorical dummy variables

whereconditions

takes the where_clause as a string

distTable

name of the in-database table having dissimilarity matrix or distance table

Details

The DB Lytix function called is FLAggClustering. In the initialization, each observation in the dataset belongs to its own cluster. In each iteration, agglomerative clustering would aggregate the two clusters that are nearest to each other, for which the distance is measured by the linkage method. This would continue until either the entire dataset belongs to one cluster or until the maximum number of iterations has been reached

Value

agnes returns a list and replicates equivalent R output from agnes in cluster package. The mapping table can be viewed using mapping component, if input is wide table.

Constraints

Plotting for large datasets takes longer time to fetch data. Error is thrown if results cannot be fetched. maxit should be more than no.of. observations for algorithm to reach completion. Error is thrown if algorithm does not reach completion or more than one cluster is formed at any step. If classSpec is not specified, the categorical variables are excluded from analysis by default.

See Also

agnes for R reference implementation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
deeptable  <- FLTable("tblUSArrests", "ObsID","VarID","Num_Val")
agnesobject <- agnes(deeptable,maxit=50)
print(agnesobject)
plot(agnesobject)

One can specify ClassSpec and transform categorical variables 
before clustering. This increases the number of variables in the plot
because categorical variable is split into binary numerical variables.
The clusters may not be well-defined as is observed in the case below

widetable  <- FLTable( "iris", "obsid")
agnesobjectnew <- agnes(widetable,maxit=500,classSpec=list("Species(setosa)"))
The below plot throws warnings!
plot(agnesobjectnew)

Fuzzy-Logix/AdapteR documentation built on May 6, 2019, 5:07 p.m.