Parameter groups¶
The escape hatch for every knob that is not a constructor argument. A field left
at None is not sent, and the crate's default applies.
NeighbourParams
dataclass
¶
NeighbourParams(
n_tree: int | None = None,
search_budget: int | None = None,
m: int | None = None,
ef_construction: int | None = None,
ef_search: int | None = None,
delta: int | float | None = None,
nnd_n_trees: int | None = None,
bt_budget: int | float | None = None,
n_list: int | None = None,
n_probes: int | None = None,
k_means: str | None = None,
pipnn_r: int | None = None,
pipnn_ef_search: int | None = None,
)
Backend-specific knobs for the CPU neighbour search.
Only the fields belonging to the backend you chose have any effect; the rest
are ignored by the core. metric is not here because it is a constructor
argument on every estimator.
Attributes:
| Name | Type | Description |
|---|---|---|
n_tree |
int | None
|
Annoy. Trees in the forest. More means better recall and a slower build. |
search_budget |
int | None
|
Annoy. Candidates inspected per query. |
m |
int | None
|
HNSW. Edges per node on the upper layers, |
ef_construction |
int | None
|
HNSW. Candidate list width during the build. |
ef_search |
int | None
|
HNSW. Beam width at query time, the recall knob. |
delta |
int | float | None
|
NN-Descent and rinnd. Convergence threshold, as a fraction of neighbours updated in an iteration. |
nnd_n_trees |
int | None
|
NN-Descent and rinnd. Random projection trees seeding the
graph. |
bt_budget |
int | float | None
|
Ball tree. Fraction of the dataset to visit per query. |
n_list |
int | None
|
IVF. Voronoi cells. |
n_probes |
int | None
|
IVF. Cells visited per query. |
k_means |
str | None
|
IVF and KmKNN. k-means training the centroids, |
pipnn_r |
int | None
|
PiPNN. Maximum out-degree of the graph. |
pipnn_ef_search |
int | None
|
PiPNN. Beam width of the self-query, the recall knob.
|
NeighbourParamsGpu
dataclass
¶
NeighbourParamsGpu(
n_list: int | None = None,
n_probes: int | None = None,
k_means: str | None = None,
k_build: int | None = None,
n_tree: int | None = None,
delta: int | float | None = None,
rho: int | float | None = None,
pipnn_r: int | None = None,
beam_width: int | None = None,
)
Backend-specific knobs for the GPU neighbour search.
A different set from NeighbourParams, not a subset: the device NN-Descent
has its own working degree and sampling knobs.
Attributes:
| Name | Type | Description |
|---|---|---|
n_list |
int | None
|
IVF-GPU. Voronoi cells. |
n_probes |
int | None
|
IVF-GPU. Cells visited per query. |
k_means |
str | None
|
IVF-GPU. k-means training the centroids, |
k_build |
int | None
|
NN-Descent-GPU. Working degree of the descent. |
n_tree |
int | None
|
NN-Descent-GPU. Trees used to seed the graph. |
delta |
int | float | None
|
NN-Descent-GPU. Convergence threshold. |
rho |
int | float | None
|
NN-Descent-GPU. Sampling rate per iteration. |
pipnn_r |
int | None
|
PiPNN. Maximum out-degree of the graph, built on the CPU.
|
beam_width |
int | None
|
PiPNN. Beam width of the device search, the recall knob.
|
UmapGraph
dataclass
¶
UmapGraph(
bandwidth: int | float | None = None,
local_connectivity: int | float | None = None,
mix_weight: int | float | None = None,
)
Fuzzy simplicial set construction.
Attributes:
| Name | Type | Description |
|---|---|---|
bandwidth |
int | float | None
|
Convergence tolerance for the smooth-kNN binary search that finds each point's sigma. |
local_connectivity |
int | float | None
|
Neighbours assumed to sit at distance zero. Raising it makes the local neighbourhood denser and the embedding tighter. |
mix_weight |
int | float | None
|
Balance between the fuzzy union and the directed graph
during symmetrisation. |
UmapOptim
dataclass
¶
UmapOptim(
a: int | float | None = None,
b: int | float | None = None,
gamma: int | float | None = None,
neg_sample_rate: int | None = None,
beta1: int | float | None = None,
beta2: int | float | None = None,
eps: int | float | None = None,
)
UMAP optimiser knobs beyond the epochs and learning rate.
Attributes:
| Name | Type | Description |
|---|---|---|
a |
int | float | None
|
Repulsion curve numerator. Fitted from |
b |
int | float | None
|
Repulsion curve exponent. See |
gamma |
int | float | None
|
Weight on the repulsive term. |
neg_sample_rate |
int | None
|
Negative samples drawn per positive edge. |
beta1 |
int | float | None
|
Adam first-moment decay. The crate uses 0.5 for UMAP rather than
the usual 0.9. Ignored by |
beta2 |
int | float | None
|
Adam second-moment decay. Ignored by the 0.6 Adam, as |
eps |
int | float | None
|
Adam denominator epsilon. Ignored by the 0.6 Adam, as |
TsneOptim
dataclass
¶
TsneOptim(
early_exag_iter: int | None = None,
early_exag_factor: int | float | None = None,
late_exag_factor: int | float | None = None,
theta: int | float | None = None,
n_interp_points: int | None = None,
max_depth: int | None = None,
)
t-SNE optimiser knobs beyond the epochs and learning rate.
Attributes:
| Name | Type | Description |
|---|---|---|
early_exag_iter |
int | None
|
Iterations of early exaggeration. |
early_exag_factor |
int | float | None
|
Multiplier on the affinities during those iterations. |
late_exag_factor |
int | float | None
|
Multiplier for the remaining iterations. |
theta |
int | float | None
|
Barnes-Hut opening angle. Larger is faster and coarser; |
n_interp_points |
int | None
|
Interpolation points per box on the FFT path. No effect under Barnes-Hut. |
max_depth |
int | None
|
Tree depth cap for |
PacmapOptim
dataclass
¶
PacmapOptim(
beta1: int | float | None = None,
beta2: int | float | None = None,
eps: int | float | None = None,
phase1_end: int | None = None,
phase2_end: int | None = None,
)
PaCMAP and LocalMAP optimiser knobs beyond the epochs and learning rate.
The three phases are what PaCMAP does instead of early exaggeration: the mid-near weight starts high, decays across phase 1, holds low through phase 2, and phase 3 is near pairs and repulsion alone.
Attributes:
| Name | Type | Description |
|---|---|---|
beta1 |
int | float | None
|
Adam first-moment decay. |
beta2 |
int | float | None
|
Adam second-moment decay. |
eps |
int | float | None
|
Adam denominator epsilon. |
phase1_end |
int | None
|
Last epoch of the mid-near dominant phase. |
phase2_end |
int | None
|
Last epoch of the decay phase. |
Fa2Optim
dataclass
¶
Fa2Optim(
strong_gravity: bool | None = None,
dissuade_hubs: bool | None = None,
edge_weight_influence: int | float | None = None,
jitter_tolerance: int | float | None = None,
theta: int | float | None = None,
)
ForceAtlas2 knobs beyond the epochs, scaling ratio, gravity and LinLog.
Defaults follow Gephi.
Attributes:
| Name | Type | Description |
|---|---|---|
strong_gravity |
bool | None
|
Distance-independent gravity, scaled by the scaling ratio. Pulls the periphery in much harder than the linear default. |
dissuade_hubs |
bool | None
|
Divide attraction by node mass, pushing hubs to the periphery. |
edge_weight_influence |
int | float | None
|
Exponent applied to the edge weights. |
jitter_tolerance |
int | float | None
|
Tolerated swinging. Larger is faster and less precise. |
theta |
int | float | None
|
Barnes-Hut opening parameter on Gephi's scale. Larger is faster
and coarser; |
NcvisOptim
dataclass
¶
NcvisOptim(
a: int | float | None = None,
b: int | float | None = None,
lr_q: int | float | None = None,
)
NCVis optimiser knobs beyond the epochs, negatives and learning rate.
Attributes:
| Name | Type | Description |
|---|---|---|
a |
int | float | None
|
Kernel numerator of |
b |
int | float | None
|
Kernel exponent. See |
lr_q |
int | float | None
|
Step size of the learned log normalisation constant. |
DensParams
dataclass
¶
Density-preservation knobs beyond the weight.
Attributes:
| Name | Type | Description |
|---|---|---|
frac |
int | float | None
|
Fraction of the run, at the end, over which the density term is active. It is switched on late so the embedding has settled first. |
var_shift |
int | float | None
|
Additive shift on the variance of the embedding log-radii, which keeps the correlation defined when the spread is tiny. |
PhateDiffusion
dataclass
¶
PhateDiffusion(
bandwidth_scale: int | float | None = None,
thresh: int | float | None = None,
graph_symmetry: str | None = None,
n_svd: int | None = None,
landmark_k_means: str | None = None,
t_max: int | None = None,
)
PHATE diffusion operator knobs beyond decay, gamma, t and the landmarks.
Attributes:
| Name | Type | Description |
|---|---|---|
bandwidth_scale |
int | float | None
|
Multiplier on the adaptive kernel bandwidth. |
thresh |
int | float | None
|
Affinities below this are zeroed, which is what keeps the operator sparse. |
graph_symmetry |
str | None
|
|
n_svd |
int | None
|
Singular vectors for spectral landmark selection. |
landmark_k_means |
str | None
|
k-means of the spectral landmark selection (not the
IVF one in |
t_max |
int | None
|
Largest diffusion time the VNE knee search will consider. Ignored
when |