Struct light_curve_feature::features::Periodogram
source · pub struct Periodogram<T, F>where
T: Float,{ /* private fields */ }
Expand description
Peaks of Lomb–Scargle periodogram and periodogram as a meta-feature
Periodogram $P(\omega)$ is an estimate of spectral density of unevenly time series. peaks
argument
corresponds to a number of the most significant spectral density peaks to return. For each peak its
period and “signal to noise” ratio is returned:
$$ \mathrm{signal~to~noise~of~peak} \equiv \frac{P(\omega_\mathrm{peak}) - \langle P(\omega) \rangle}{\sigma_{P(\omega)}}. $$
Periodogram can accept other features for feature extraction from periodogram as it was time series without observation errors (unity weights are used if required). You can even pass one Periodogram to another one if you are crazy enough
- Depends on: time, magnitude
- Minimum number of observations: as required by sub-features, but at least two
- Number of features: $2 \times \mathrm{peaks}$ plus sub-features
Implementations
sourceimpl<T, F> Periodogram<T, F>where
T: Float,
F: FeatureEvaluator<T>,
impl<T, F> Periodogram<T, F>where
T: Float,
F: FeatureEvaluator<T>,
pub fn default_peaks() -> usize
pub fn default_resolution() -> f32
pub fn default_max_freq_factor() -> f32
sourcepub fn set_freq_resolution(&mut self, resolution: f32) -> &mut Self
pub fn set_freq_resolution(&mut self, resolution: f32) -> &mut Self
Set frequency resolution
The larger frequency resolution allows to find peak period with better precision
sourcepub fn set_max_freq_factor(&mut self, max_freq_factor: f32) -> &mut Self
pub fn set_max_freq_factor(&mut self, max_freq_factor: f32) -> &mut Self
Multiply maximum (Nyquist) frequency
Maximum frequency is Nyquist frequncy multiplied by this factor. The larger factor allows to find larger frequency and makes PeriodogramPowerFft more precise. However large frequencies can show false peaks
sourcepub fn set_nyquist(&mut self, nyquist: NyquistFreq) -> &mut Self
pub fn set_nyquist(&mut self, nyquist: NyquistFreq) -> &mut Self
Define Nyquist frequency
sourcepub fn add_feature(&mut self, feature: F) -> &mut Self
pub fn add_feature(&mut self, feature: F) -> &mut Self
Extend a feature to extract from periodogram
pub fn set_periodogram_algorithm(
&mut self,
periodogram_power: PeriodogramPower<T>
) -> &mut Self
pub fn power(&self, ts: &mut TimeSeries<'_, T>) -> Vec<T>
pub fn freq_power(&self, ts: &mut TimeSeries<'_, T>) -> (Vec<T>, Vec<T>)
sourceimpl<T, F> Periodogram<T, F>where
T: Float,
F: FeatureEvaluator<T> + From<PeriodogramPeaks>,
impl<T, F> Periodogram<T, F>where
T: Float,
F: FeatureEvaluator<T> + From<PeriodogramPeaks>,
sourcepub fn new(peaks: usize) -> Self
pub fn new(peaks: usize) -> Self
New Periodogram that finds given number of peaks
Trait Implementations
sourceimpl<T: Clone, F: Clone> Clone for Periodogram<T, F>where
T: Float,
impl<T: Clone, F: Clone> Clone for Periodogram<T, F>where
T: Float,
sourcefn clone(&self) -> Periodogram<T, F>
fn clone(&self) -> Periodogram<T, F>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<T, F> Default for Periodogram<T, F>where
T: Float,
F: FeatureEvaluator<T> + From<PeriodogramPeaks>,
impl<T, F> Default for Periodogram<T, F>where
T: Float,
F: FeatureEvaluator<T> + From<PeriodogramPeaks>,
sourceimpl<'de, T, F> Deserialize<'de> for Periodogram<T, F>where
T: Float,
T: Float,
F: FeatureEvaluator<T> + From<PeriodogramPeaks> + TryInto<PeriodogramPeaks>,
<F as TryInto<PeriodogramPeaks>>::Error: Debug,
impl<'de, T, F> Deserialize<'de> for Periodogram<T, F>where
T: Float,
T: Float,
F: FeatureEvaluator<T> + From<PeriodogramPeaks> + TryInto<PeriodogramPeaks>,
<F as TryInto<PeriodogramPeaks>>::Error: Debug,
sourcefn 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>,
sourceimpl<T, F> EvaluatorInfoTrait for Periodogram<T, F>where
T: Float,
F: FeatureEvaluator<T> + From<PeriodogramPeaks> + TryInto<PeriodogramPeaks>,
<F as TryInto<PeriodogramPeaks>>::Error: Debug,
impl<T, F> EvaluatorInfoTrait for Periodogram<T, F>where
T: Float,
F: FeatureEvaluator<T> + From<PeriodogramPeaks> + TryInto<PeriodogramPeaks>,
<F as TryInto<PeriodogramPeaks>>::Error: Debug,
sourcefn min_ts_length(&self) -> usize
fn min_ts_length(&self) -> usize
sourcefn is_t_required(&self) -> bool
fn is_t_required(&self) -> bool
sourcefn is_m_required(&self) -> bool
fn is_m_required(&self) -> bool
sourcefn is_w_required(&self) -> bool
fn is_w_required(&self) -> bool
sourcefn is_sorting_required(&self) -> bool
fn is_sorting_required(&self) -> bool
sourceimpl<T, F> FeatureEvaluator<T> for Periodogram<T, F>where
T: Float,
F: FeatureEvaluator<T> + From<PeriodogramPeaks> + TryInto<PeriodogramPeaks>,
<F as TryInto<PeriodogramPeaks>>::Error: Debug,
impl<T, F> FeatureEvaluator<T> for Periodogram<T, F>where
T: Float,
F: FeatureEvaluator<T> + From<PeriodogramPeaks> + TryInto<PeriodogramPeaks>,
<F as TryInto<PeriodogramPeaks>>::Error: Debug,
sourcefn eval(&self, ts: &mut TimeSeries<'_, T>) -> Result<Vec<T>, EvaluatorError>
fn eval(&self, ts: &mut TimeSeries<'_, T>) -> Result<Vec<T>, EvaluatorError>
EvaluatorError
sourcefn eval_or_fill(&self, ts: &mut TimeSeries<'_, T>, fill_value: T) -> Vec<T>
fn eval_or_fill(&self, ts: &mut TimeSeries<'_, T>, fill_value: T) -> Vec<T>
sourcefn check_ts_length(
&self,
ts: &TimeSeries<'_, T>
) -> Result<usize, EvaluatorError>
fn check_ts_length(
&self,
ts: &TimeSeries<'_, T>
) -> Result<usize, EvaluatorError>
sourceimpl<T, F> FeatureNamesDescriptionsTrait for Periodogram<T, F>where
T: Float,
F: FeatureEvaluator<T> + From<PeriodogramPeaks> + TryInto<PeriodogramPeaks>,
<F as TryInto<PeriodogramPeaks>>::Error: Debug,
impl<T, F> FeatureNamesDescriptionsTrait for Periodogram<T, F>where
T: Float,
F: FeatureEvaluator<T> + From<PeriodogramPeaks> + TryInto<PeriodogramPeaks>,
<F as TryInto<PeriodogramPeaks>>::Error: Debug,
sourceimpl<T> From<Periodogram<T, Feature<T>>> for Feature<T>where
T: Float,
impl<T> From<Periodogram<T, Feature<T>>> for Feature<T>where
T: Float,
sourcefn from(v: Periodogram<T, Self>) -> Feature<T>
fn from(v: Periodogram<T, Self>) -> Feature<T>
sourceimpl<T, F> JsonSchema for Periodogram<T, F>where
T: Float,
F: FeatureEvaluator<T>,
impl<T, F> JsonSchema for Periodogram<T, F>where
T: Float,
F: FeatureEvaluator<T>,
sourcefn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read more