new ScatterPlot()
ScatterPlot is a graph visualization of how words cluster in a corpus document similarity, correspondence analysis or principal component analysis. You can work with the ScatterPlot algorithms programmatically using Spyral.Corpus#analysis.
- Tutorials:
Example
let config = {
"analysis": null,
"bins": null,
"clusters": null,
"comparisonType": null,
"dimensions": null,
"docId": null,
"iterations": null,
"label": null,
"limit": null,
"perplexity": null,
"query": null,
"stopList": null,
"storeJson": null,
"target": null,
"term": null,
"whitelist": null,
};
loadCorpus("austen").tool("scatterplot", config);
Members
-
analysis
-
Properties:
Name Type Description analysisString The type of analysis to perform. Options are: 'ca', 'pca', 'tsne', and 'docSim'.
-
bins
-
Properties:
Name Type Default Description binsNumber 10 The number of "bins" to divide the result into.
-
clusters
-
Properties:
Name Type Default Description clustersNumber 3 The number of clusters within which to group words.
-
comparisonType
-
Properties:
Name Type Default Description comparisonTypeString relative The value to use for comparing terms. Options are: 'raw', 'relative', and 'tfidf'.
-
dimensions
-
Properties:
Name Type Default Description dimensionsNumber 3 The number of dimensions to render, either 2 or 3.
-
docId
-
Properties:
Name Type Description docIdString | Array.<String> The document ID(s) to restrict the results to.
-
height
-
Properties:
Name Type Description heightNumber The display height of the tool in pixels. -
iterations
-
Properties:
Name Type Default Description iterationsNumber 1500 The TSNE iterations value.
-
label
-
Properties:
Name Type Description labelArray.<String> The label types to show. One or more of: 'summary', 'docs', and 'terms'.
-
limit
-
Properties:
Name Type Default Description limitNumber 50 The number of items to limit the result to.
-
perplexity
-
Properties:
Name Type Default Description perplexityNumber 15 The TSNE perplexity value.
-
query
-
Properties:
Name Type Description queryString | Array.<String> A query or array of queries (queries can be separated by a comma). For query syntax, see the search documentation.
-
stopList
-
Properties:
Name Type Default Description stopListString auto A comma-separated list of words, a named list or a URL to a plain text list, one word per line. By default this is set to 'auto' which auto-detects the document's language and loads an appropriate list (if available for that language). Set this to blank to not use the default stopList. For more information see the Stopwords documentation.
-
storeJson
-
Properties:
Name Type Description storeJsonString TODO used in embed
-
style
-
Properties:
Name Type Description styleString A string of CSS properties to use as the style attribute for the tool's parent tag. -
target
-
Properties:
Name Type Description targetString The term to set as the target. This will filter results to terms that are near the target.
-
term
-
Properties:
Name Type Description termArray.<String> Used in combination with "target" as a white list of terms to keep.
-
whiteList
-
Properties:
Name Type Description whiteListString A list of words to always include
-
width
-
Properties:
Name Type Description widthNumber The display width of the tool in pixels.