pub struct FrozenFeatureHost {
pub e_feat: DMatrix<f32>,
pub b_feat: Vec<f32>,
pub keep_target_indices: Vec<usize>,
pub keep_src_indices: Vec<usize>,
pub src_e_feat: DMatrix<f32>,
pub src_names: Vec<Box<str>>,
pub n_src: usize,
pub h: usize,
}Expand description
Loaded + aligned frozen feature side ready to hand off to a candle
engine (graph-embedding-util or one of the topic-model encoders).
Rows are reordered to follow the target axis. keep_target_indices
records which positions in the caller’s target feature axis survived
the intersection — the caller MUST restrict its data (triplets,
encoder D, decoder β) to these indices, otherwise the row order
disagrees with the embedding rows.
Fields§
§e_feat: DMatrix<f32>[|keep|, H], rows in the same order as keep_target_indices.
b_feat: Vec<f32>[|keep|]. Zeros when no bias_path was given.
keep_target_indices: Vec<usize>Indices into the target feature axis that matched a source row.
Length equals e_feat.nrows().
keep_src_indices: Vec<usize>The source (dictionary) row each kept target row came from, parallel to
keep_target_indices — what a caller needs to look up any other table
keyed on the dictionary’s rows (a module membership, say).
src_e_feat: DMatrix<f32>The whole source table [n_src, H] and its row names, as read — so a
caller that needs the unmatched rows too (to place a gene by its
neighbours’ rows) does not decode the file a second time.
src_names: Vec<Box<str>>§n_src: usizeRows in the dictionary file, i.e. how many features the MODEL has.
The only field that survives the intersection unfiltered, and the reason
it exists: e_feat and keep_target_indices are both already restricted
to the matched features, so a coverage fraction built from them is
identically 1 and tells a caller nothing. This is the denominator.
h: usizeAuto Trait Implementations§
impl Freeze for FrozenFeatureHost
impl RefUnwindSafe for FrozenFeatureHost
impl Send for FrozenFeatureHost
impl Sync for FrozenFeatureHost
impl Unpin for FrozenFeatureHost
impl UnsafeUnpin for FrozenFeatureHost
impl UnwindSafe for FrozenFeatureHost
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.