pub struct EntropyFeaturesExtractor { /* private fields */ }Expand description
Entropy-Based Feature Extractor
Extracts entropy-based features from data including Shannon entropy, Rényi entropy, sample entropy, and approximate entropy measures.
§Parameters
n_bins- Number of bins for histogram-based entropyinclude_conditional_entropy- Whether to include conditional entropy featureswindow_size- Window size for sample entropy computationtolerance- Tolerance for approximate entropy
§Examples
use sklears_feature_extraction::statistical_features::EntropyFeaturesExtractor;
use scirs2_core::ndarray::array;
let data = array![1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0];
let extractor = EntropyFeaturesExtractor::new()
.n_bins(8)
.window_size(2)
.tolerance(0.1);
let features = extractor.extract_features(&data.view()).expect("valid data produces features");Implementations§
Source§impl EntropyFeaturesExtractor
impl EntropyFeaturesExtractor
Sourcepub fn include_conditional_entropy(
self,
include_conditional_entropy: bool,
) -> Self
pub fn include_conditional_entropy( self, include_conditional_entropy: bool, ) -> Self
Set whether to include conditional entropy features
Sourcepub fn window_size(self, window_size: usize) -> Self
pub fn window_size(self, window_size: usize) -> Self
Set the window size for sample entropy
Sourcepub fn extract_features(
&self,
data: &ArrayView1<'_, Float>,
) -> SklResult<Array1<Float>>
pub fn extract_features( &self, data: &ArrayView1<'_, Float>, ) -> SklResult<Array1<Float>>
Extract entropy-based features from data
Trait Implementations§
Source§impl Clone for EntropyFeaturesExtractor
impl Clone for EntropyFeaturesExtractor
Source§impl Debug for EntropyFeaturesExtractor
impl Debug for EntropyFeaturesExtractor
Auto Trait Implementations§
impl Freeze for EntropyFeaturesExtractor
impl RefUnwindSafe for EntropyFeaturesExtractor
impl Send for EntropyFeaturesExtractor
impl Sync for EntropyFeaturesExtractor
impl Unpin for EntropyFeaturesExtractor
impl UnsafeUnpin for EntropyFeaturesExtractor
impl UnwindSafe for EntropyFeaturesExtractor
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