pub struct TensorFeatures {
pub mean: f32,
pub std: f32,
pub min: f32,
pub max: f32,
pub kurtosis: f32,
pub skewness: f32,
pub sparsity: f32,
pub l1_norm: f32,
pub l2_norm: f32,
pub inf_norm: f32,
pub nan_count: f32,
pub inf_count: f32,
}Expand description
12-dimensional feature vector for tensor anomaly detection.
Per Dr. Popper’s audit on Curse of Dimensionality: “Ensure you have sufficient data (n >> p) before enabling Mahalanobis distance checks, or use a regularized covariance estimator.”
Fields§
§mean: f32Mean: E[x]
std: f32Standard deviation: sqrt(Var[x])
min: f32Minimum value: min(x)
max: f32Maximum value: max(x)
kurtosis: f32Kurtosis: E[(x-μ)⁴]/σ⁴ - 3 (excess kurtosis)
skewness: f32Skewness: E[(x-μ)³]/σ³
sparsity: f32Sparsity: |{x: x=0}| / n
l1_norm: f32L1 norm: Σ|x|
l2_norm: f32L2 norm: sqrt(Σx²)
inf_norm: f32Infinity norm: max(|x|)
nan_count: f32NaN count: |{x: isnan(x)}|
inf_count: f32Inf count: |{x: isinf(x)}|
Implementations§
Source§impl TensorFeatures
impl TensorFeatures
Sourcepub fn from_data(data: &[f32]) -> TensorFeatures
pub fn from_data(data: &[f32]) -> TensorFeatures
Extract features from tensor data
Sourcepub fn has_jidoka_violation(&self) -> Option<JidokaViolation>
pub fn has_jidoka_violation(&self) -> Option<JidokaViolation>
Check for immediate Jidoka stop conditions
Trait Implementations§
Source§impl Clone for TensorFeatures
impl Clone for TensorFeatures
Source§fn clone(&self) -> TensorFeatures
fn clone(&self) -> TensorFeatures
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TensorFeatures
impl Debug for TensorFeatures
Source§impl Default for TensorFeatures
impl Default for TensorFeatures
Source§fn default() -> TensorFeatures
fn default() -> TensorFeatures
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TensorFeatures
impl RefUnwindSafe for TensorFeatures
impl Send for TensorFeatures
impl Sync for TensorFeatures
impl Unpin for TensorFeatures
impl UnsafeUnpin for TensorFeatures
impl UnwindSafe for TensorFeatures
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
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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