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

stzUMAP

54 own methods · 24 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; 15 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzUMAP([ [ 1, 2 ], [ 2, 3 ], [ 8, 9 ], [ 9, 8 ], [ 1, 1 ], [ 8, 8 ] ]). 39 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 stzUMAP([ [ 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 stzUMAP([ [ 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
HasGraph
(no comment in the source: the name reads as a sentence) has graph
composed example
o1 = new stzUMAP([ [ 1, 2 ], [ 2, 3 ], [ 8, 9 ], [ 9, 8 ], [ 1, 1 ], [ 8, 8 ] ])
? o1.HasGraph()
#--> 0
composed from the signature, run for this page
no extension
GraphInfo
[ points, width, neighbours, edges ] of the resident graph, or [] before a fitno extension
ReleaseGraph
Give the engine's graph back. The next Fit() builds it again.QCSXTZZZIBWU
SetNeighbors
THE LOCAL/GLOBAL DIAL. Small values see fine structure and fragment; large values see the broad shape and smear detail. The reference implementation defaults to 15.QCSXTZZZIBWU
Neighbors
(no comment in the source: the name reads as a sentence) neighbors
composed example
o1 = new stzUMAP([ [ 1, 2 ], [ 2, 3 ], [ 8, 9 ], [ 9, 8 ], [ 1, 1 ], [ 8, 8 ] ])
? o1.Neighbors()
#--> 15
composed from the signature, run for this page
no extension
SetMinDistance
How tightly points may pack. Smaller packs tighter, which makes clusters look more separated -- an appearance you are choosing, not a finding.QCSXTZZZIBWU
SetSpread
(no comment in the source: the name reads as a sentence) set spreadQCSXTZZZIBWU
SetDimensions
(no comment in the source: the name reads as a sentence) set dimensionsQCSXTZZZIBWU
SetEpochs
(no comment in the source: the name reads as a sentence) set epochsQCSXTZZZIBWU
SetSeed
(no comment in the source: the name reads as a sentence) set seedQCSXTZZZIBWU
ReduceWithPCA
(no comment in the source: the name reads as a sentence) reduce with pcaQCSXTZZZIBWU
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 stzUMAP([ [ 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
(no comment in the source: the name reads as a sentence) pcaqno extension
LearnFromLabels
A supervised embedding WILL separate your classes. That is what you asked for. It is therefore NOT evidence that the classes are separable, and the picture must never be shown as if it were -- the separation is an input, not a finding. What it is genuinely good for: seeing structure WITHIN classes you already trust, and laying out data whose grouping is not in question so that something else can be looked at.QCSXTZZZIBWU
IgnoreLabels
(no comment in the source: the name reads as a sentence) ignore labelsQCSXTZZZIBWU
IsSupervised
(no comment in the source: the name reads as a sentence) is supervised
composed example
o1 = new stzUMAP([ [ 1, 2 ], [ 2, 3 ], [ 8, 9 ], [ 9, 8 ], [ 1, 1 ], [ 8, 8 ] ])
? o1.IsSupervised()
#--> 0
composed from the signature, run for this page
no extension
Labels
(no comment in the source: the name reads as a sentence) labelsno extension
SetTargetWeight
MEASURED, and it is not the shape one would assume: separation rises to about 0.2 and then FALLS, and beyond ~0.9 the setting stops meaning anything at all because the penalty underflows. Crushing every cross-class edge fragments the graph -- points lose most of their neighbours and the classes come apart into pieces instead of two groups. More supervision is not more separation.QCSXTZZZIBWU
TargetWeight
(no comment in the source: the name reads as a sentence) target weight
composed example
o1 = new stzUMAP([ [ 1, 2 ], [ 2, 3 ], [ 8, 9 ], [ 9, 8 ], [ 1, 1 ], [ 8, 8 ] ])
? o1.TargetWeight()
#--> 0.50
composed from the signature, run for this page
no extension
PreserveDensity
Getting the density right COSTS the separation between groups -- the term buys room by spending what the layout was using to hold clusters apart. There is no setting that is simply better: a high lambda answers "how dense is each region" at the expense of "how many groups are there", and the second is usually why the plot was opened. (Note this dial IS monotone, unlike SetTargetWeight() -- do not carry either shape over to the other.)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 stzUMAP([ [ 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
how hard to push. 0 turns the term off entirely, and does so EXACTLY -- the run is bit-for-bit the ordinary fit rather than a near one.QCSXTZZZIBWU
DensityWeight
(no comment in the source: the name reads as a sentence) density weight
composed example
o1 = new stzUMAP([ [ 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 epochs during which the term is active. It is switched on late deliberately: on a random start the embedded radii are noise, so their correlation with anything is noise, and its gradient is noise with a lever arm.QCSXTZZZIBWU
DensityPhase
(no comment in the source: the name reads as a sentence) density phase
composed example
o1 = new stzUMAP([ [ 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
It is NOT a percentage. An embedding that gets every density rank BACKWARDS can still score around -0.6 rather than -1, because reversing an order is not the same as negating it.
composed example
o1 = new stzUMAP([ [ 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
This is a DATA PRODUCT, not a by-product of drawing: it ranks rows by isolation and is meaningful with no reference to the embedding at all. Use it to find outliers or to weight a downstream model. It costs nothing extra, because the density term has to compute it anyway.no extension
LearnMapping
So if the point of supervising is to pull apart classes the geometry does NOT already separate, use SkipMapping() and take the free-form fit -- and give up the exact transform. That is the trade, stated rather than discovered later.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 stzUMAP([ [ 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
(no comment in the source: the name reads as a sentence) set hidden layersQCSXTZZZIBWU
HiddenLayers
(no comment in the source: the name reads as a sentence) hidden layers
composed example
o1 = new stzUMAP([ [ 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
MEASURED, and the reason the gradient is AVERAGED per point rather than summed: with a summed epoch gradient a point's step was proportional to how many edges touched it, and at a learning rate only twice the default every point of a cluster collapsed onto the same output -- while the separation ratio reported 6471293, which reads like a triumph. Averaging made the whole range 0.005 to 0.05 behave. A summary ratio is never evidence on its own.QCSXTZZZIBWU
LearningRate
(no comment in the source: the name reads as a sentence) learning rateno extension
LearnInverse
Two dimensions cannot hold thirty. The inverse recovers what the embedding KEPT and invents the rest. It is 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 stzUMAP([ [ 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
Hence the defaults of [64,64] and 15000. A decoder is a regression problem and wants far more epochs than the embedding itself did.QCSXTZZZIBWU
Inverse
The points do not have to 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 rather than a recovered one.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 stzUMAP([ [ 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 -- see stzTSNE.Trustworthiness(); the same engine call on the data the fit saw (the PCA scores when reducing) and the embeddingno extension
TrustworthinessAt
(no comment in the source: the name reads as a sentence) trustworthiness atno extension
CurveParameters
The fitted similarity curve 1/(1 + a*d^(2b)). Reported because a and b are DERIVED from min_dist and spread by a least-squares fit rather than given, and a caller may reasonably want to see what their setting turned into.no extension
Transform
This is not a refit. See the note at the top of this file for what that costs.no extension
NewLocalRadii
Computed whether or not density preservation is on, because it is a property of the data rather than of the placement, and it costs nothing -- the transform has to measure those distances anyway.no extension
LocalRadiiOf
It has to be the data rather than the map, and the parametric variant is why: a network saturates, so a row far outside the training range comes back 0.000001 from a legitimate one. The training set has not saturated -- 356 units from anything is 356 units from anything.no extension
Why
(no comment in the source: the name reads as a sentence) whyno extension