pub struct SearchSpace {Show 13 fields
pub projection_kinds: Vec<ProjectionKind>,
pub laplacian_k_neighbors: Vec<usize>,
pub laplacian_active_threshold: Vec<f64>,
pub umap_n_neighbors: Vec<usize>,
pub umap_n_epochs: Vec<usize>,
pub umap_category_weight: Vec<f64>,
pub umap_min_dist: Vec<f64>,
pub num_domain_groups: Vec<usize>,
pub low_evr_threshold: Vec<f64>,
pub overlap_artifact_territorial: Vec<f64>,
pub threshold_base: Vec<f64>,
pub threshold_evr_penalty: Vec<f64>,
pub min_evr_improvement: Vec<f64>,
}Expand description
Discrete candidate values for each tunable knob.
Every field holds the full set of values the tuner will consider for that knob. Grid search enumerates the Cartesian product; random search samples uniformly from each set per trial.
Defaults are chosen to bracket the historical hardcoded value on each knob, giving the tuner room to move either direction without being unreasonable.
Fields§
§projection_kinds: Vec<ProjectionKind>Candidate projection families for the outer sphere. Each kind is
prefit once per distinct fit-affecting hyperparameter tuple in
auto_tune; trials pick the prefit matching their config.
laplacian_k_neighbors: Vec<usize>Candidate values for LaplacianConfig::k_neighbors. Only
explored when ProjectionKind::LaplacianEigenmap is in
projection_kinds.
laplacian_active_threshold: Vec<f64>Candidate values for LaplacianConfig::active_threshold. Only
explored when ProjectionKind::LaplacianEigenmap is in
projection_kinds.
umap_n_neighbors: Vec<usize>Candidate values for UmapConfig::n_neighbors. Only explored
when ProjectionKind::UmapSphere is in projection_kinds.
umap_n_epochs: Vec<usize>Candidate values for UmapConfig::n_epochs. Only explored
when ProjectionKind::UmapSphere is in projection_kinds.
umap_category_weight: Vec<f64>Candidate values for UmapConfig::category_weight. Only
explored when ProjectionKind::UmapSphere is in
projection_kinds.
umap_min_dist: Vec<f64>Candidate values for UmapConfig::min_dist. Only explored
when ProjectionKind::UmapSphere is in projection_kinds.
num_domain_groups: Vec<usize>Candidate values for RoutingConfig::num_domain_groups.
low_evr_threshold: Vec<f64>Candidate values for RoutingConfig::low_evr_threshold.
overlap_artifact_territorial: Vec<f64>Candidate values for BridgeConfig::overlap_artifact_territorial.
threshold_base: Vec<f64>Candidate values for BridgeConfig::threshold_base.
threshold_evr_penalty: Vec<f64>Candidate values for BridgeConfig::threshold_evr_penalty.
min_evr_improvement: Vec<f64>Candidate values for InnerSphereConfig::min_evr_improvement.
Implementations§
Source§impl SearchSpace
impl SearchSpace
Sourcepub fn large_corpus() -> Self
pub fn large_corpus() -> Self
Search space optimized for large corpora (> 10 000 items).
Includes PCA and UMAP (but not Laplacian eigenmap, which is O(N²) on the affinity matrix). UMAP uses the ANN-backed kNN graph, making it O(N log N) for graph construction.
Source§impl SearchSpace
impl SearchSpace
Sourcepub fn validate(&self, strategy: &SearchStrategy) -> Result<(), PipelineError>
pub fn validate(&self, strategy: &SearchStrategy) -> Result<(), PipelineError>
Validate this space against a SearchStrategy and return a
structured PipelineError::InvalidSearchSpace if anything is
off — empty axis, missing kind-specific knobs, or budget too
small for the strategy to make progress. Called upfront from
auto_tune so every strategy fails at the same boundary
instead of panicking mid-trial (random/Bayesian) or silently
rolling up into AllTrialsFailed { failures: [] } (Grid).
Sourcepub fn grid_cardinality(&self) -> usize
pub fn grid_cardinality(&self) -> usize
Cardinality of the kind-conditional grid: the sum of each projection
kind’s own slice. grid search visits exactly this many configurations.
Sourcepub fn config_at_index(
&self,
index: usize,
base: &PipelineConfig,
) -> Option<PipelineConfig>
pub fn config_at_index( &self, index: usize, base: &PipelineConfig, ) -> Option<PipelineConfig>
Build a PipelineConfig from one grid index.
The grid is laid out as disjoint per-kind slices concatenated in
the order of Self::projection_kinds: indices 0..c₀ enumerate
the first kind’s subspace, c₀..c₀+c₁ the second kind’s, etc. This
keeps kind-specific knobs (e.g. Laplacian’s k, threshold) from
multiplying against trials of other kinds that wouldn’t use them.
Trait Implementations§
Source§impl Clone for SearchSpace
impl Clone for SearchSpace
Source§fn clone(&self) -> SearchSpace
fn clone(&self) -> SearchSpace
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SearchSpace
impl Debug for SearchSpace
Source§impl Default for SearchSpace
impl Default for SearchSpace
Source§impl<'de> Deserialize<'de> for SearchSpace
impl<'de> Deserialize<'de> for SearchSpace
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SearchSpace
impl RefUnwindSafe for SearchSpace
impl Send for SearchSpace
impl Sync for SearchSpace
impl Unpin for SearchSpace
impl UnsafeUnpin for SearchSpace
impl UnwindSafe for SearchSpace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more