pub struct TensorFeatureExtractor {
pub config: ExtractorConfig,
pub stats: ExtractorStats,
}Expand description
Extracts statistical and structural features from tensor data.
Fields§
§config: ExtractorConfigActive configuration.
stats: ExtractorStatsAccumulated statistics.
Implementations§
Source§impl TensorFeatureExtractor
impl TensorFeatureExtractor
Sourcepub fn new(config: ExtractorConfig) -> Self
pub fn new(config: ExtractorConfig) -> Self
Create a new extractor with the given configuration.
Sourcepub fn extract(&mut self, tensor_id: u64, data: &[f64]) -> ExtractionResult
pub fn extract(&mut self, tensor_id: u64, data: &[f64]) -> ExtractionResult
Extract all configured features from data and tag the result with tensor_id.
Updates internal statistics on each call.
Sourcepub fn extract_batch(
&mut self,
tensors: Vec<(u64, Vec<f64>)>,
) -> Vec<ExtractionResult>
pub fn extract_batch( &mut self, tensors: Vec<(u64, Vec<f64>)>, ) -> Vec<ExtractionResult>
Extract features from a batch of (tensor_id, data) pairs, returning
results in the same order as the input.
Sourcepub fn stats(&self) -> &ExtractorStats
pub fn stats(&self) -> &ExtractorStats
Return a reference to the accumulated statistics.
Auto Trait Implementations§
impl Freeze for TensorFeatureExtractor
impl RefUnwindSafe for TensorFeatureExtractor
impl Send for TensorFeatureExtractor
impl Sync for TensorFeatureExtractor
impl Unpin for TensorFeatureExtractor
impl UnsafeUnpin for TensorFeatureExtractor
impl UnwindSafe for TensorFeatureExtractor
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Converts
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>
Converts
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