cts.cluster( nodes as Array, [options as Object?] ) as Object
Produces a set of clusters from
an array of nodes. The nodes can be
any set of nodes, and are typically the result of a
cts.search
operation.
Parameters | |
---|---|
nodes | The array of nodes to cluster. |
options |
An
object representation of the options
for defining the clustering parameters.
The following is a sample options
object:
The
The options
object also includes indexing
options in the The database options are the same as the database options shown for
|
cts.cluster( cts.search(cts.wordQuery("steroids")).toArray(), { algorithm: "lsi", hierarchicalLevels: 3, minClusters: 2, maxClusters: 12, overlapping: false, labelIgnoreWords: ["of", "the", "on", "in", "at", "a", "an", "for", "from", "by", "and"], stemmedSearches: "advanced", fastPhraseSearches: true, fastElementWordSearches:true, fastElementPhraseSearches:true } ); => { "clusters":[ { "id":"4904706095739760677", "label":"neonate, cortisol, fetal", "nodes":[3,4,7,9,14] }, { "id":"741204961292539384", "label":"fetal, cortisol, being", "nodes":[8,15] }, { "id":"9998437716377655230", "label":"locus, male, fetal", "nodes":[6] }, ... { "id":"7956765932334497548", "parentId":"14551791662219883254", "label":"normal, endometrium, also", "nodes":[17] }, { "id":"4427100138446341770", "parentId":"14551791662219883254", "label":"km, administration, do", "nodes":[12] } ], "options":{ "algorithm":"lsi", "language":"en", "stemmedSearches":"advanced", "fastElementPhraseSearches":true, "fastElementWordSearches":true, "maxClusters":12, "minClusters":2, "hierarchicalLevels":3, "maxTerms":200, "labelMaxTerms":3, "labelIgnoreWords":[ "a","an","and","at","by","for","from","in","of","on","the"], "labelIgnoreAttributes":false, "numTries":1, "score":"logtfidf", "useDbConfig":false, "details":false, "overlapping":false } }