Softanza
StartFrançais
Softanza
The library documents itself · Numeric & optimization

stzTSNE

43 own methods · 18 forms written with extensions, listed under their method

the source: base/number/stzEmbedding.ring(opens in a new tab) · All classes · The area reference: Numeric & optimization

Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean

Examples: 0 come from the library's tests; 11 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzTSNE([ [ 1, 2 ], [ 2, 3 ], [ 8, 9 ], [ 9, 8 ], [ 1, 1 ], [ 8, 8 ] ]). 32 methods have none yet. Examples run on 2026-10-03 20:23 inside the library at commit 0e72e2e2c.

Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
NumberOfSamples
(no comment in the source: the name reads as a sentence) number of samples
composed example
o1 = new stzTSNE([ [ 1, 2 ], [ 2, 3 ], [ 8, 9 ], [ 9, 8 ], [ 1, 1 ], [ 8, 8 ] ])
? o1.NumberOfSamples()
#--> 6
composed from the signature, run for this page
no extension
NumberOfFeatures
(no comment in the source: the name reads as a sentence) number of features
composed example
o1 = new stzTSNE([ [ 1, 2 ], [ 2, 3 ], [ 8, 9 ], [ 9, 8 ], [ 1, 1 ], [ 8, 8 ] ])
? o1.NumberOfFeatures()
#--> 2
composed from the signature, run for this page
no extension
SetPerplexity
── the dials ── Roughly "how many neighbours should count". The original paper suggests 5..50, and the result IS sensitive to it: small values see fine structure and can fragment a real cluster, large values see the broad shape and can merge two.QCSXTZZZIBWU
Perplexity
(no comment in the source: the name reads as a sentence) perplexityno extension
SetDimensions
(no comment in the source: the name reads as a sentence) set dimensionsQCSXTZZZIBWU
SetIterations
(no comment in the source: the name reads as a sentence) set iterationsQCSXTZZZIBWU
SetSeed
(no comment in the source: the name reads as a sentence) set seedQCSXTZZZIBWU
ReduceWithPCA
PCA to n dimensions before embedding -- the standard pipeline. See the note at the top of this file for why it is two benefits and one cost.QCSXTZZZIBWU
SkipPCA
(no comment in the source: the name reads as a sentence) skip pcaQCSXTZZZIBWU
UsesPCA
(no comment in the source: the name reads as a sentence) uses pca
composed example
o1 = new stzTSNE([ [ 1, 2 ], [ 2, 3 ], [ 8, 9 ], [ 9, 8 ], [ 1, 1 ], [ 8, 8 ] ])
? o1.UsesPCA()
#--> 0
composed from the signature, run for this page
no extension
PCAQ
the inner analysis, when there was one -- so a caller can ask how much variance survived the reduction before reading anything into the pictureno extension
LearnMapping
IT IS A TRADE, not an upgrade. The embedding is generally somewhat worse than ordinary t-SNE, because free coordinates can go anywhere and a network's outputs are limited to what it can express.QCSXTZZZIBWU
SkipMapping
(no comment in the source: the name reads as a sentence) skip mappingQCSXTZZZIBWU
IsParametric
(no comment in the source: the name reads as a sentence) is parametric
composed example
o1 = new stzTSNE([ [ 1, 2 ], [ 2, 3 ], [ 8, 9 ], [ 9, 8 ], [ 1, 1 ], [ 8, 8 ] ])
? o1.IsParametric()
#--> 0
composed from the signature, run for this page
no extension
SetHiddenLayers
The hidden layer widths. The output layer is always LINEAR and as wide as the embedding, because a coordinate is unbounded and squashing it through a tanh would cap the layout at a box.QCSXTZZZIBWU
HiddenLayers
(no comment in the source: the name reads as a sentence) hidden layers
composed example
o1 = new stzTSNE([ [ 1, 2 ], [ 2, 3 ], [ 8, 9 ], [ 9, 8 ], [ 1, 1 ], [ 8, 8 ] ])
? @@( o1.HiddenLayers() )
#--> [ 50, 20 ]
composed from the signature, run for this page
no extension
SetLearningRate
(no comment in the source: the name reads as a sentence) set learning rateQCSXTZZZIBWU
Transform
Only available after LearnMapping(). Ordinary t-SNE has no map to apply, and manufacturing one by re-running the optimisation would be a different answer wearing the same name.no extension
PreserveDensity
t-SNE reports its own objective, so unlike UMAP the price is directly visible: KL rises from 0.291 to 0.443 at the default. That is neighbourhood fidelity being spent on density fidelity, in the units of the thing given up.QCSXTZZZIBWU
IgnoreDensity
(no comment in the source: the name reads as a sentence) ignore densityQCSXTZZZIBWU
IsDensityPreserving
(no comment in the source: the name reads as a sentence) is density preserving
composed example
o1 = new stzTSNE([ [ 1, 2 ], [ 2, 3 ], [ 8, 9 ], [ 9, 8 ], [ 1, 1 ], [ 8, 8 ] ])
? o1.IsDensityPreserving()
#--> 0
composed from the signature, run for this page
no extension
SetDensityWeight
0 turns the term off EXACTLY -- bit-for-bit the ordinary fit, not a near one. Values between about 1.5 and 3 are the unstable band described above.QCSXTZZZIBWU
DensityWeight
(no comment in the source: the name reads as a sentence) density weight
composed example
o1 = new stzTSNE([ [ 1, 2 ], [ 2, 3 ], [ 8, 9 ], [ 9, 8 ], [ 1, 1 ], [ 8, 8 ] ])
? o1.DensityWeight()
#--> 0
composed from the signature, run for this page
no extension
SetDensityPhase
the FINAL fraction of iterations during which the term runs. Late on purpose, and for a reason t-SNE has that UMAP does not: EARLY EXAGGERATION multiplies P by 12 for the first quarter of the run to force gaps open, so density measured during it would preserve a scale the algorithm is about to throw away.QCSXTZZZIBWU
DensityPhase
(no comment in the source: the name reads as a sentence) density phase
composed example
o1 = new stzTSNE([ [ 1, 2 ], [ 2, 3 ], [ 8, 9 ], [ 9, 8 ], [ 1, 1 ], [ 8, 8 ] ])
? o1.DensityPhase()
#--> 0.30
composed from the signature, run for this page
no extension
DensityCorrelation
how far the term got. NOT a percentage -- an embedding with every density rank backwards still scores around -0.6 rather than -1.
composed example
o1 = new stzTSNE([ [ 1, 2 ], [ 2, 3 ], [ 8, 9 ], [ 9, 8 ], [ 1, 1 ], [ 8, 8 ] ])
? o1.DensityCorrelation()
#--> 0
composed from the signature, run for this page
no extension
LocalRadii
Weighted here by t-SNE's joint distribution where stzUMAP weights by the fuzzy graph. Two different weightings of the same neighbourhoods, agreeing on which rows are dense.no extension
NewLocalRadii
Available whether or not the fit preserved density, because it is a property of the data rather than of the map. the radii of the rows the last Transform() placed. The classic extension measures them on its way past; the parametric one cannot, so there it stays empty and LocalRadiiOf() is the way to ask.no extension
LocalRadiiOf
(no comment in the source: the name reads as a sentence) local radii ofno extension
LearnInverse
Two dimensions cannot hold six. The inverse recovers what the embedding KEPT and invents the rest: a plausible row for a location, never a recovered one.QCSXTZZZIBWU
HasInverse
(no comment in the source: the name reads as a sentence) has inverse
composed example
o1 = new stzTSNE([ [ 1, 2 ], [ 2, 3 ], [ 8, 9 ], [ 9, 8 ], [ 1, 1 ], [ 8, 8 ] ])
? o1.HasInverse()
#--> 0
composed from the signature, run for this page
no extension
SetInverseLayers
(no comment in the source: the name reads as a sentence) set inverse layersQCSXTZZZIBWU
SetInverseEpochs
a decoder is a REGRESSION problem and wants far more epochs than the embedding itself did -- measured, [32,32] at 3000 was three times WORSE than a plain lookup and [64,64] at 40000 a third betterQCSXTZZZIBWU
Inverse
TAKE POINTS IN THE MAP, RETURN ROWS IN THE DATA. The points need not be positions of training rows -- somewhere between two clusters is exactly the question worth asking, and the answer is a plausible row for that location.no extension
Fit
(no comment in the source: the name reads as a sentence) fitQCSXTZZZIBWU
IsFitted
(no comment in the source: the name reads as a sentence) is fitted
composed example
o1 = new stzTSNE([ [ 1, 2 ], [ 2, 3 ], [ 8, 9 ], [ 9, 8 ], [ 1, 1 ], [ 8, 8 ] ])
? o1.IsFitted()
#--> 0
composed from the signature, run for this page
no extension
Embedding
(no comment in the source: the name reads as a sentence) embeddingno extension
Trustworthiness
THE WITNESS (Venna & Kaski 2006, as scikit-learn computes it): 1.0 when the embedding invented no neighbour; every neighbour a point gained in the map that was not among its k nearest in the input is charged by how far down the input ordering it really sat. Needs only the data the fit saw and the embedding -- no labels, no generator -- and it is the number the field compares on. Computed by the engine, on the device past its gate.no extension
TrustworthinessAt
(no comment in the source: the name reads as a sentence) trustworthiness atno extension
KLHistory
The objective, per iteration. Worth looking at: an embedding is stochastic, and this is the only evidence the optimisation went anywhere.no extension
FinalKL
(no comment in the source: the name reads as a sentence) final klno extension
Why
(no comment in the source: the name reads as a sentence) whyno extension